Dear All,
I am working on a requirement where when I save a report, the report needs to be saved in the excel format. The problem that I am facing now is to determine the excel version. Reason being, when I save an excel in .xls format (Hard coded in the method), and if the application (Developed in Vw 5i.0) is being used in a machine where MS office 2007 is installed, then I want that file to be saved with an extension .xlsx and vice versa. ie, if the user saves the report in a machine where MS office is 2003, then it should be saved in .xls format. Is there any way that I can determine the version of the ms office (Especially excel). Please give your valuable input to this. |
If you have COM support loaded,
| dd | dd := COMDispatchDriver createObject: 'Excel.Application'. [dd getProperty: 'Version'] ensure: [dd release] '14.0' -Boris -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Jay Sent: Tuesday, August 02, 2011 12:59 PM To: [hidden email] Subject: [vwnc] MS Office Dear All, I am working on a requirement where when I save a report, the report needs to be saved in the excel format. The problem that I am facing now is to determine the excel version. Reason being, when I save an excel in .xls format (Hard coded in the method), and if the application (Developed in Vw 5i.0) is being used in a machine where MS office 2007 is installed, then I want that file to be saved with an extension .xlsx and vice versa. ie, if the user saves the report in a machine where MS office is 2003, then it should be saved in .xls format. Is there any way that I can determine the version of the ms office (Especially excel). Please give your valuable input to this. -- View this message in context: http://forum.world.st/MS-Office-tp3713007p3713007.html Sent from the VisualWorks mailing list archive at Nabble.com. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Thanks Boris.I did try this before posting this comment and could get the version number, but didnt notice the use of release.
Thanks for your comment |
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Boris,
Thanks again. It did work for me. I could get the office version details using the COM methods. However, few things to clarify. I use Vw 5i.0. So will there be any problem with the file format and while saving the file,i save it in xlsx or xls based on the ms office version installed in the machine. I am curious to know about the Binary File Format used in MS office excel..Just would like to ensure that this will not break anything else down the line in the application? From the below! (Courtesy: Wikipedia), "Microsoft Excel up until 2007 version used a proprietary binary file format called Binary Interchange File Format (BIFF) as its primary format.[50] Excel 2007 uses Office Open XML as its primary file format, an XML-based format that followed after a previous XML-based format called "XML Spreadsheet" ("XMLSS"), first introduced in Excel 2002.[51] Although supporting and encouraging the use of new XML-based formats as replacements, Excel 2007 remained backwards-compatible with the traditional, binary formats. In addition, most versions of Microsoft Excel can read CSV, DBF, SYLK, DIF, and other legacy formats. Support for some older file formats were removed in Excel 2007.[52] The file formats were mainly from DOS based programs" Regards Jay |
Jay,
I don't know much about the format, but presumably calling a dispatch via COM will produce proper format since it's the end app doing the writing. Sent from my iPhone On 2011-08-16, at 23:59, "Jay" <[hidden email]> wrote: > Boris, > Thanks again. It did work for me. I could get the office version details > using the COM methods. However, few things to clarify. > I use Vw 5i.0. So will there be any problem with the file format and while > saving the file,i save it in xlsx or xls based on the ms office version > installed in the machine. > > I am curious to know about the Binary File Format used in MS office > excel..Just would like to ensure that this will not break anything else down > the line in the application? > >> From the below! > (Courtesy: Wikipedia), > > "Microsoft Excel up until 2007 version used a proprietary binary file > format called Binary Interchange File Format (BIFF) as its primary > format.[50] Excel 2007 uses Office Open XML as its primary file format, an > XML-based format that followed after a previous XML-based format called "XML > Spreadsheet" ("XMLSS"), first introduced in Excel 2002.[51] > Although supporting and encouraging the use of new XML-based formats as > replacements, Excel 2007 remained backwards-compatible with the traditional, > binary formats. In addition, most versions of Microsoft Excel can read CSV, > DBF, SYLK, DIF, and other legacy formats. Support for some older file > formats were removed in Excel 2007.[52] The file formats were mainly from > DOS based programs" > > Regards > Jay > > > -- > View this message in context: http://forum.world.st/MS-Office-tp3713007p3749087.html > Sent from the VisualWorks mailing list archive at Nabble.com. > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Jay
The new XLSX format is really just a Zip file of XML files placed in specific directories. If you open the XLSX file in Zip you can extract the file into its constituent XML files. If you edit these files (correctly) and zip them again you can create a new XLSX file which Excel will load.
Having said that, we find it more convenient to output the XML Spreadsheet format which Excel will also read. David Buck Simberon Inc. www.simberon.com Sent from my BlackBerry device on the Rogers Wireless Network _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |