The ODBC SQL statement "CREATE TABLE" will create a new "sheet" in Excel;
UPDATE and SELECT work to retrieve rows and columns from existing sheets
(tables). (SELECT columnname FROM sheetname....UPDATE sheetname SET ....)
I have not figured out how to "create" the spreadsheet file itself, but if
you have a "*.xls" file, you can do these things without resorting to OLE.
(Actually, I haven't been able to figure out how to set up an ODBC DSN or
ODBC file DSN for Excel without the *.xls file already existing).
--
Michael Mattias
Tal Systems Inc.
Racine WI USA
Quote:
> > I would like to use SQL statements to create a MS Excel spreadsheet on
> > the fly. I do not need to do any updates or deletes. I just need to be
> > able to create a spreadsheet with data that I now write to a file and
> > later on import into Excel manually. I am using CA-Realia and have
> > been very successful reading/writing/updating/deleting, etc. with MS
> > Access via SQL statements.
> SQL does not create Excel spreadsheets.
> There are OLE functions (or whatever it is called now) that allow you
> to manipulate an Excel spreadsheet from within a program.
> --
> Lorne Sunley