Fred Sanford Posted July 11, 2006 Report Share Posted July 11, 2006 HI all. I'm looking for a way to open an excel file that contains a test profile. I created the code to do it with the report generation tools and it worked great on my development machine. Then I tried to impliment and realized that Excel wasn't installed on the test stands. So, I either have to buy excel for each of the 7 test stands. Change the user spreadsheet to save in .csv or .txt or get LV to open a .xls file in its native format. The 2nd option sounds easiest but the 3rd sounds like a fun challenge. Problem is that I don't know where to start. Any suggestions? Thanks, Fred Sanford Quote Link to comment
crelf Posted July 11, 2006 Report Share Posted July 11, 2006 1) So, I either have to buy excel for each of the 7 test stands.2) Change the user spreadsheet to save in .csv or .txt 3) get LV to open a .xls file in its native format. Option 1 = lots of $$$ Option 2 = :thumbup: Not difficult Option 3 = :thumbdown: Not doable as the .xls file format is Microsoft proprietary. Quote Link to comment
Yair Posted July 11, 2006 Report Share Posted July 11, 2006 or get LV to open a .xls file in its native format. I think that Open Office might have support for .xls, but I don't know for sure and I don't know how they implement it if they do.Another option - I know that MS has a viewer for viewing .ppt files. It's possible that they also have one for viewing .xls files and that you might be able to use it. Overall, it's probably better to define your own format using CSV and stick to that, as it's platform independent and you know it won't change. Quote Link to comment
Chris Davis Posted July 11, 2006 Report Share Posted July 11, 2006 I think that Open Office might have support for .xls, but I don't know for sure and I don't know how they implement it if they do.Another option - I know that MS has a viewer for viewing .ppt files. It's possible that they also have one for viewing .xls files and that you might be able to use it. Overall, it's probably better to define your own format using CSV and stick to that, as it's platform independent and you know it won't change. Open Office will open .xls files and its free. Although you might be better off with your own .csv format in the long run as yen suggested. Quote Link to comment
kai_n Posted February 3, 2007 Report Share Posted February 3, 2007 The XLS-file format is proprietary but OpenOffice does know a lot about it. Here you can get all information needed to do a "save to xls" routine: http://sc.openoffice.org/excelfileformat.pdf But thats definately a lot of work. If you decide to do it, let me know, may be we could work together, I couldn't get myself to do it all alone... Quote Link to comment
Rolf Kalbermatter Posted February 5, 2007 Report Share Posted February 5, 2007 Option 3 = :thumbdown: Not doable as the .xls file format is Microsoft proprietary. Well Option 3 is not exactly undoable but pretty useless. All office formats with exception of the latest use the so called "structured object storage" format that MS actually has documented partly in the past. It is basically streaming of OLE objects into a binary stream of data. Now the difficulty is about figuring out the actual object elements in this stream for the different Office applications and reverse engineering is definitely possible. Open Office has done that. But it is basically useless because Microsoft has changed the object hierarchy with every new Office version in the past and with the newest Office even moved away more or less entirely by using XML instead. Dealing with these version differences is a nightmare, and reverse engineering such a format without an entire OpenOffice developer community is doomed to fail as you will be starting to figure out the actual workings of a format just about at the point where the next version is due. Rolf Kalbermatter Quote Link to comment
Chris Davis Posted February 5, 2007 Report Share Posted February 5, 2007 For completeness, you can use something like this converter which would allow you to convert an xls to csv, then back again, all without using excel's activeX control. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.