how to save excel sheet after making changes to an opened excel sheet or how to take object of the excel file at the run time

Posted on 2005-04-26
Last Modified: 2010-04-17
I wil have to open an excel sheet on the browser.I do this by


Response.ContentType = "application/"


but after opening the excel sheet i want to make some changes on this excel sheet then save it to the same location , unable to do this bcoz i dont have run time object of this excel sheet.
when i tried to do this by

Dim xlobj As New Microsoft.Office.Interop.Excel.Application

it gives error :- object reference not set to an instance of an object

Best Regards,
Question by:softsolvers

    Accepted Solution


    Try this:
    Dim xlobj As New Microsoft.Office.Interop.Excel.Application


    Author Comment

    this works fine but what we have to do is - my excel file is opened in browser and then make some changes , so to do this i have to take the object of the excel sheet at run time and then through that object i will save the file but unable to get the object at run time.
    LVL 4

    Assisted Solution

    Display Excel in a browser is one thing  (and you are doing it in the right way) but receive it back is a different story !
    The only way will be for the user to post it back (uploading back to your server) after saving you sheet in a local storage. You can't do this automatically using just HTML.  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Javascript: Crash Course

    Javascript is not only emerging as the most important language to know, it's flexibility is unique. With Javascript being deployed on the web, mobile and even the desktop this is the one language that all technologists need to know.

    Suggested Solutions

    Title # Comments Views Activity
    post4 challenge 28 69
    count7 challenge 12 52
    wordlen challenge 3 26
    python question 5 35
    INTRODUCTION We all know how to code. But at times you simply want to insert a common code block into your existing code and amend it as per your requirements. This tool not only saves you time but also saves you the pain of typing it all out aga…
    A short article about problems I had with the new location API and permissions in Marshmallow
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 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

    13 Experts available now in Live!

    Get 1:1 Help Now