XLS file-format

  • Thread starter Thread starter Clouds®
  • Start date Start date
C

Clouds®

Ej,

Not really programming in Excel, so a little OT....

I'd like to create an Excel-file from within a little program I'm writing.
It has to export query-results to a file, readable for Excel.

Creating tsv or csv is not really an option, since I don't want to be
bothered with the import options when opening such files.

So now I need to know how xls-files are built, what info they contain etc.

Anyone got a hint where to find this info, if it is available at all?

Other suggestions are welcome too, workarounds are programmable too :-)

TIA!
 
saving as a CSV would not involve formats

However, you havent' said what language you are
programming in.

In VB6, VB.Net set a reference to the MS Excel Objects
Library. Having done so yuo can instantaite the
application, ad a workbook, popu;ate teh sheets etc and
save the workbook.

Without knowing what you're intending, its a tough
question. However, you can examine the object model in
the object browser.

Patrick Molloy
Microsoft Excel MVP
 
However, you havent' said what language you are
programming in.

Using Delphi 5...but the program is a plugin for a third-party app, and
hence subject to limitations...
Without knowing what you're intending, its a tough
question. However, you can examine the object model in
the object browser.

The third-party app queries a database and returns an array with the
results. This array should be saved in xls-format. I can have my plugin
iterate through all records and rows, and doing that should result in the
code to write the xls-file.

Already found some information on the format,
http://sc.openoffice.org/excelfileformat.pdf
Now looking in Delphi for built-in Excel-functions....I'm not a very
experienced programmer :-)
 
You could try writing out the data as an HTML table in plain text and saving
the file with an xls extension. Should be OK with xl97+.

You can use css formatting to tart it up.

Tim
 
Back
Top