ASP/VB.NET Create Excel workbook with multiple worksheets (not using Automation)

I need to create Excel workbooks containing a variable number of worksheets. Is this possible using ADO.NET? As well as writing data I will also need to set column widths and format certain cell colours.
WhiteEagleAsked:
Who is Participating?
 
RonaldBiemansConnect With a Mentor Commented:
You can use ADO.net to read from and write to an excel worksheet, but you can not create workbooks/sheets, alter column widths format cell colours without automation.
0
 
RonaldBiemansCommented:
Sorry, you have to use automation. ADO.net can't do that for you
0
 
WhiteEagleAuthor Commented:
If I go with automation, doesn't that mean I need a method to restrict the number of users who are trying to generate an Excel file at the same time?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
RonaldBiemansCommented:
Hi WhiteEagle,

What do mean with, "restrict the number of users who are trying to generate an Excel file at the same time"

do you mean to check if the excel file already exist ?
0
 
WhiteEagleAuthor Commented:
No. I am concerned that Excel is a single-user desktop application, and therefore problems may occur iseveral users on the server are all trying to create an Excel file using Automation at the same time.
0
 
RonaldBiemansCommented:
That shouldn't be a problem, since all the users will instanciate their own excel object on there 'local' computer
0
 
WhiteEagleAuthor Commented:
If the code is running on the server, won't the server be creating many instances of an Excel object, one for each user trying to create an Excel file?
0
 
RonaldBiemansCommented:
Sorry, I just realized it is a Web application.

You are correct, it will create many instances of the excel object but as far as I know, there is no restriction on that besides memory.

The fact that excel is a single user desktop application just means that there can only be one user per instance, but there can be many instances.

0
 
RonaldBiemansCommented:
I explained it quite bad, but I think you get the idea
0
 
WhiteEagleAuthor Commented:
many thanks for your help
0
All Courses

From novice to tech pro — start learning today.