View Single Post
  #6   Report Post  
Posted to microsoft.public.dotnet.framework,microsoft.public.excel.programming,microsoft.public.dotnet.framework.aspnet
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default generating Excel files w/ .NET? (an ASP.NET, C# web app)

VB/VBA is COM based. .Net is not.
You would need a COM wrapper for any .Net components and call the wrapper
from Excel/VBA.

But why not use the standard ADO library from VBA and avoid the .Net
completely.
Also the email side is striaght forward :
http://www.rondebruin.nl/sendmail.htm

If you want to "keep it all .NET", you can't use VBA.

NickHK

wrote in message
oups.com...
hello,

can anyone speak to some of the common or preferred methods for
building Excel .XLS files, programmatically thru the .NET framework?

i have an intranet app that needs to generate & email .xls files for
users. these are not reports, but rather more like forms. its a pretty
simple doc, two worksheets -- the first is basic info common to all
recepients. the second is a simple data table that, depending on the
recepient, contains pre-populated rows of data. there are some blank
date fields in the table for the recepient to fill in. (and yep, after
they do so and save, it will eventually get sent back to us for parsing
of the values)

i wont really get into the why's of this project, but suffice it to say
this is the workflow we need.

i had hoped i could retrieve an ADO.NET datatable of my recepient's
rows, loop thru it, and add rows/cells to an in-memory Excel doc. then
stream it out to the user or email it.

as i understand VBA was designed to do this, but i would prefer to
avoid VBA and keep it all .NET. ive found some 3rd party components to
do such a thing, but at $7,500 a CPU, they seem pretty expensive. are
there any other alternatives?


thanks!
matt