Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Spreadsheet Question

Status
Not open for further replies.

born2program

Technical User
Sep 18, 2006
85
US
How do you use a excel com object in vb.net behind a asp.net page. I have tried using the following code but is not successful. I basically need to be able to write to a spreadsheet cell by cell from a dataset (not just push a whole datagrid out to excel). Any help is appreciated. Thanks.

Code:
Dim xl As Excel.Application
        Dim book As Workbook
        Dim sheet As Worksheet


        xl = CreateObject("Excel.Application")
        xl.Visible = True
 
personall I like CarlosAg Excel Writer. it doesn't require the Office Interop assemblies. I found these to be slow and not developer friendly in terms of property/function naming.

If you use the Office Interop files you must have MS Office installed on the server. You cannot just use the assemblies. This was the case when I experimented with it.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
jmeckley
I like the idea of what you suggest and it may be very good in most situations, but the library you referenced does not really do what the poster wants. They produce xml output that recent generations of excel can interpret and open as a spreadsheet.

I'm still going to look at them more though :)

Rhys
The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense Edsgar Dijkstra

Church of the Flying Spaghetti Monster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top