If all else fails and your only task is to import data into a more readable format, maybe automating Excel / OpenOffice / LibreOffice is an approach.
See OpenOffice::UNO and/or Win32::OLE.
Maybe the OpenOffice macro recorder can help you get a close enough script to work with the unwieldly setup that the OpenOffice scripting approach needs.
| [reply] |
Hello Laurielounge,
It is really strange your question for a variety of reasons:
I am wondering if you really have a Excel file 2.0, see (Microsoft Excel (Spreadsheet)), sample of content:
Excel 2.0 is the very first version of Excel for the PC. Version 1.x was only available for the Mac. Excel 2.x for Windows runs under Microsoft Windows 2 or a Windows 2 runtime. Excel 2.0 for Windows was released on both 3.5" 720k and 5.25" 1.2mb floppy disk images.
Given the information above I am really wondering if you have an excel file that was running an a very old WindowsOS back in 1987, I assume that you could open the file in a more recent Excel version and store it in a more recent version, or copy paste the content to a newer version and process the file.
Since Perl was released on the 18th December 1987 see (Perl 1.000), so I am not really sure if someone back in 1987 developed a module capable of processing Excel files back then.
Any way let's assume that under all these assumptions are correct and indeed you have a Excel 2.0 file that you are unable to open in a newer version of Excel and store it etc...etc...etc...etc...
Given all these assumptions and that most if not all of us we can not test an Excel 2.0 file to play with it, but there is a small possibility that the following modules could work. Give it a try and let us know for future reference:
Using Win32::OLE and Excel - Tips and Tricks
Spreadsheet::Read from the documentation:
Spreadsheet::Read tries to transparently read *any* spreadsheet and return its content in a universal manner independent of the parsing module that does the actual spreadsheet scanning.
So hopefully one of these modules could help you to overcome your problem.
Hope this helps, and as I mentioned let us know if any of the modules work for future reference.
Seeking for Perl wisdom...on the process of learning...not there...yet!
| [reply] [d/l] [select] |
If it is really Excel 2.0, some later version should be able to read it. I'm not sure, but IIRC, Excel 95 could handle Excel 2.0 files. So: Open Excel 2.0 file in Excel 95, then save as Excel 95 and go on like for any other Excel 95 file.
Update:
I've no MS Office available, but LibreOffice 4.4.2.2 groups Excel files like this in the "Open file" dialog:
- MS Excel 4.x - 5.0 / 95
- MS Excel 97/2000/XP/2003
- MS Excel 2003 XML
- MS Excel 2007 Binary
- MS Excel 2007/2010/2013
So my guess is that are the five latest file formats of excel files. Pre-4.0 Excel files are likely different.
Second Update:
I digged in some old CDROMs, and found two old Excel versions:
Office 97 Professional: Hidden in the custom setup, below "Text Converters" is the "Microsoft Excel Converter" that - according to its description - "converts documents from Microsoft Excel versions 2.x, 3.0, 4.0, 5.0, 95 and 97 to Word 97". Not optimal, but better than nothing. The Excel 97 file open dialog lists MS Excel 4.0 Workbooks as one of the supported formats, and some unspecified "Worksheets". I don't know if that is meant to be Excel before 4.0 or not.
Excel 7.0a for Windows 95: Also starts at Excel 4.0 and has some unspecified worksheets.
So maybe, one needs Excel 4.x or 5.0 to convert Excel 2.0 to newer formats, step by step via Excel 4.x/5.0 and Excel 95/97.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] |