From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Excel Report specifically for Excel 97-2003 format

Solved!
Go to solution

Hi everyone,

 

Currently I have a program that creates Excel reports using the Report Generation Toolkit for Microsoft Office and when I save the file I create a file whose extension is .xls.  I thought this would allow it to be opened in MS Excel 2003 but the file is actually created in .xlsx format only under the .xls extension.  Whenever I open these files in MS Excel they say that my *.xls file is in a different format than specified by the file extension.  If I then resave the file in  Excel 97-2003 format I can open it without this notification.

 

The reason why I need it in this format is that software I am using to read excel files in JAVA cannot be in anything newer than the Excel 97-2003 format. 

 

Any thoughts or suggestions would be appreciated.

 

 

0 Kudos
Message 1 of 4
(3,157 Views)
Solution
Accepted by topic author cschruder

Try pointing to a 97-2003 .xls template.  Open the file first and use it for your reports and then save under a different name.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
Message 2 of 4
(3,153 Views)

That worked.  Thanks MoReese

0 Kudos
Message 3 of 4
(3,147 Views)

Hi: I am having the same problem. By following some examples that I have found, if I open the newest Excel application, let's say Office 2010, the command

 

Excel_WorkbooksAdd (ExcelWorkbooksHandle, NULL, CA_DEFAULT_VAL, &ExcelWorkbookHandle);

 

will open a *.xlsx template because that would be the CA_DEFAULT_VAL for it. How do I specify the 97-2003 format value that should replace the CA_DEFAULT_VAL?

 

I have tried to use others that I found in the *.h like ExcelConst_xlWorkbookNormal to see what happens, but I get an error. Probably the command does not accept a direct name like that. I cannot open the help in my command windows, thus I cannot see which are any other valid options. At least the Excel2000.fp allows you to choose a template. The ExcelReport.fp one does not allow you to. Its ExcelRpt_WorkbookNew command is too generic.

 

I don't want to open a *.xls template apart first because the idea is to make the saving procedure as automated as possible. The code should be able to do all of it without any user intervention other than specifying where the file will be saved. The user should not even specify if it should be csv, xls, xlsx, or anything. It should come automatically as *xls.

 

Any help will be appreciated.

0 Kudos
Message 4 of 4
(2,787 Views)