Exporting Data to Excel and Word

  • Thread starter Thread starter mphanke
  • Start date Start date
M

mphanke

Hi,

I'm writting an application based on an SQL Server for Order Management.
I have some data I want to export to Excel and Word, maybe some day I
will implement a serial letter.

The problem is I don't have Office installed on my Computer. Is there
something I can use for this task on the MSDN-DVDs? Where can I find a
couple tutorials on dealing with things like that on the web???

Any help is appreciated,

Regards,

Martin
 
If you can target Office 2003 - one solution might be to use XML. Do
some searches on your local MSDN content for WordML and SpreadsheetML.
 
For a spreadsheet, writing the data to a SYLK file is probably the fastest,
although the file format is not well documented. In the past I had a need to
create some rather complicated EXCEL files using VB6, and the performance of
creating a single wotkbook with 136 worksheets was aborted after 14 hours
and the work incomplete -- once I coded the SYLK format and wote the
information to 136 SYLK files the program completed all work in less that
three (3) minutes. The advantage of SYLK is that it is a pure text format,
so it is very fast to create, and can be read by most spreadsheet programs.
I have some C# code that supports this, but I have not had time to clean it
up much. Contact me off-list if you are interested.

The problem with the COM interface to EXCEL (and WORD) is that they are very
slow. There is an incredibly complex round-trip that seems to perform
multiple translations and, as noted by the other responder, you must have
the applicaitons installed.

The problem with the XML format is that the files cannot be opened with
older versions of the applications, or with other applications.

If you do figure out how to do this, posting some information would be of
interest to myself and others.

-ken
 
To Ken:

I would really be interested in the source code you used as I am also
looking to output my data to Excel or Word documents. I've never heard of
SYLK. Could you please let me know a bit more about it. My E-mail is
(e-mail address removed)
 
Back
Top