.NET and Office Automation

A

Andy

Hello,

I have previously written an application (VB6) that automatically creates
Excel and Word documents using office automation, i.e by referencing the
Office/Excel library under the VB6 project.

However I now need to create excel documents automatically in a .NET
application (preferably a Windows Service). Shall I use the same approach
(automation such as the following link:
http://www.ragingsmurf.com/code.aspx?key=3JBXWMQ30V) even in .NET, or is
there a better way in creating Excel documents in .NET without having to use
automation?

Thanks in advance for any help, tips, links or guidance on this matter.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?QW5keQ==?=,
I have previously written an application (VB6) that automatically creates
Excel and Word documents using office automation, i.e by referencing the
Office/Excel library under the VB6 project.

However I now need to create excel documents automatically in a .NET
application (preferably a Windows Service). Shall I use the same approach
(automation such as the following link:
http://www.ragingsmurf.com/code.aspx?key=3JBXWMQ30V) even in .NET, or is
there a better way in creating Excel documents in .NET without having to use
automation?
that depends on what the Excel files should contain. You have three basic
options:

1. automation, as you've done up until now

2. Creating an XML file in the Excel "dialect"

3. Using VSTO

(1) is still the most versatile. (3) is very similar, but is document-specific.
However, the code can still be linked to the file, if you need user
interaction. (2) will be fastest to generate, and Excel wouldn't even have to
be on the machine (or server) but WHAT you can generate is limited (no charts
or graphics, for example)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top