Perl code to access and create Excel sheets:
http://search.cpan.org/~kwitknr/Spreadsheet-ParseExcel-0.
2603/ParseExcel.pm
There is also a WriteExcel module (by a different author, go figure).
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.
02/lib/Spreadsheet/WriteExcel.pm
--
The chicago project aimed at building a shared library to handle
reading and writing excel files. If you don't want to write an excel
importer/exporter in Squeak yourself, you could use the library through
FFI(3). I don't know how far they've come and what the status of the
project is, but it might be worth a look(1). Here(2) are also some
pointers to general info about the excel file formats and
implementations in various languages.
Hope this helps,
Alex
(1) http://chicago.sf.net
(2) http://chicago.sourceforge.net/devel/docs/excel/
(3) http://minnow.cc.gatech.edu/squeak/1414
--
Another possibility is to define data ranges in Excel an then access
them by ODBC.
--
you can also try to do your job using Cincom's VisualWorks Smalltalk
Non-Commercial version. There is a set of parcels called Com-* by
which you can access any ActiveX object through Microsoft's COM
interface.
The job is relatively easy since the hierarchy of suitable
COMAutomationControllers including ExcelApplicationController is
already there. Then you can just write your script very similar to
VisualBasic Macro (you can even cheat and simulate things by first
record a macro in Excel and then study the VB code). Or you can of
course extend the controller classes according to your needs.
excel := (Examples.ExcelApplicationController currentClass new)
isVisible: true; yourself.
sheet := excel addWorkbook.
excel setRange: 'A1' to: 'Hello World'.
Transcript cr; show: (excel getRange: 'A1') value.
excel saveActiveWorkbookAs: 'c:\helloWorld.xls'.
excel quit.
sheet release.
excel release.
--
Diego Gomez Deck has written an OpenOffice importer that imports the
zipped XML spreadsheet (and other) files from Open Office. (I think;
he's at least done the word processor and presentation program).
Open Office can read Excel.
You can run Open office (oocalc) from Squeak to do the conversion,
probably (may have to write a macro in their Basic (?) to do it)
Putting it all together gives you something that's going to support
more than just the data (including fonts, etc.)
If just the data is important, there's a number of other ways to do it
(as suggested, CSV is easy to parse).
--
Just as something else to consider... Ruby, which is pretty much
"Perl-meets-Smalltalk", has support for reading and writing Excel
files via the Win32 API.