Solved

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

Posted on 2004-10-29
732 Views
Last Modified: 2008-01-09
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.
0
Question by:WhiteEagle
    10 Comments
     
    LVL 25

    Expert Comment

    by:RonaldBiemans
    Sorry, you have to use automation. ADO.net can't do that for you
    0
     
    LVL 25

    Accepted Solution

    by:
    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
     

    Author Comment

    by:WhiteEagle
    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
     
    LVL 25

    Expert Comment

    by:RonaldBiemans
    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
     

    Author Comment

    by:WhiteEagle
    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
     
    LVL 25

    Expert Comment

    by:RonaldBiemans
    That shouldn't be a problem, since all the users will instanciate their own excel object on there 'local' computer
    0
     

    Author Comment

    by:WhiteEagle
    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
     
    LVL 25

    Expert Comment

    by:RonaldBiemans
    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
     
    LVL 25

    Expert Comment

    by:RonaldBiemans
    I explained it quite bad, but I think you get the idea
    0
     

    Author Comment

    by:WhiteEagle
    many thanks for your help
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Learn The Basics of Ethical Hacking & Pen Testing

    Computer and network security is one of the fastest growing and most essential industries in technology, meaning companies will pay big bucks for ethical hackers. This is the perfect course to leap into this lucrative career, learning how to use ethical hacking to reveal ...

    Suggested Solutions

    I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
    Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    This video Micro Tutorial is the first in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles al…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now