07-22-2011 09:32 AM
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.
Solved! Go to Solution.
07-22-2011 11:03 AM
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.
07-22-2011 11:37 AM
That worked. Thanks MoReese
11-05-2013 12:46 PM
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.