+ Reply to Thread
Results 1 to 3 of 3

Change XLS-File Format via VB .NET

Hybrid View

  1. #1
    Ulrich Szagun
    Guest

    Change XLS-File Format via VB .NET

    Hi,
    I am new to programming Excel. The task seems to be quite simple:
    I get an Excel-File in a wrong format (Format 2.1) that is not
    readable for VB .NET until I open it in Excel and save it as an Excel
    2000 file.

    Via VB .NET automation it is no problem for me to open the file in
    Excel 2000, change some data and save it again. The problem is that
    the file format is still Excel 2.1. How can I save the file as an
    Excel 2000-File...

    I would be grateful for any hints...

    Ulrich Szagun

  2. #2
    CoRrRan
    Guest

    Re: Change XLS-File Format via VB .NET

    reisen@szagun.com (Ulrich Szagun) wrote in
    news:b55ef033.0504080001.1ea9ff4f@posting.google.com:

    > Hi,
    > I am new to programming Excel. The task seems to be quite simple:
    > I get an Excel-File in a wrong format (Format 2.1) that is not
    > readable for VB .NET until I open it in Excel and save it as an Excel
    > 2000 file.
    >
    > Via VB .NET automation it is no problem for me to open the file in
    > Excel 2000, change some data and save it again. The problem is that
    > the file format is still Excel 2.1. How can I save the file as an
    > Excel 2000-File...
    >
    > I would be grateful for any hints...
    >
    > Ulrich Szagun
    >


    Have a look at this code:

    ActiveWorkbook.SaveAs FileName:= _
    "C:\Temp\Book2.xls", FileFormat:=xlExcel9795
    I couldn't find an specific option for saving the file to the current
    platform version (your case Excel 2000), but I think that xlExcel9795
    should work for your purposes. (As my version (Excel 2003) shows that this
    FileFormat will provide a format readable to Excel 97 to 2003.)

    HTH,
    CoRrRan

  3. #3
    Myrna Larson
    Guest

    Re: Change XLS-File Format via VB .NET

    I think the format you want is xlWorkbookNormal.

    And xlExcel9795 workbook includes both xl95 format and xl97 format. It's
    double the normal size.

    On 08 Apr 2005 11:12:00 GMT, CoRrRan >Have a look at this code:
    >
    >
    >ActiveWorkbook.SaveAs FileName:= _
    >    "C:\Temp\Book2.xls", FileFormat:=xlExcel9795
    >
    >
    >I couldn't find an specific option for saving the file to the current
    >platform version (your case Excel 2000), but I think that xlExcel9795
    >should work for your purposes. (As my version (Excel 2003) shows that this
    >FileFormat will provide a format readable to Excel 97 to 2003.)
    >
    >HTH,
    >CoRrRan



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1