Link to home
Start Free TrialLog in
Avatar of softsolvers
softsolvers

asked on

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

I wil have to open an excel sheet on the browser.I do this by

Response.Clear()

Response.ContentType = "application/vnd.ms-excel"
Response.WriteFile("../Files/jaya.xls")

Response.End()

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
xlobj.ActiveWorkbook.Save()

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



Best Regards,
SoftSolvers
dotnet@softsolvers.com
ASKER CERTIFIED SOLUTION
Avatar of CYNETAddict
CYNETAddict

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of softsolvers
softsolvers

ASKER

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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial