Can i save my changes back to server

Based onUnsupported Features in Excel ServicesI know I cannot author an Excel workbook using Excel Services.

However I want to know more about it:If i make a changes to an excel workbook using Excel Services.Can i Save the changes back to original workbook on server?

[538 byte] By [stswordman] at [2008-1-3]
# 1

No, you can't.

However, what you can do is from the toolbar 'open in excel', and then save back to the original workbook from within excel client.

If you're using Excel Server API, then you can call the soap method GetWorkbook, and use webdav to store it back into sharepoint.

IraLevin at 2007-9-25 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Excel Services...
# 2
Hi,
I have been able to save changes back to the server by accessing the byte array using the getworkbook method, then opening the published excel worksheet via the MOSS object model, and then saving the byte array onto the worksheet by passing it(the byte array) to the savebinary method of that excel file object.

byte[] excelByteArray = excelService.GetWorkbook(sessionId, WebPartLibrary1.ES.WorkbookType.FullWorkbook,out stati);

SPSite siteCollection = SPControl.GetContextSite(Context);
SPWeb srcSite = siteCollection.AllWebs[0];//"Test Site"
srcSite.AllowUnsafeUpdates = true;
SPFile srcFile = srcSite.GetFile("excel%20lib/clisttoexceltest4.xlsx");
string fileName = srcFile.Name;
srcFile.SaveBinary(excelByteArray);

If this code is placed after the code in which you make your changes,the file gets updated with the changes.
Hope this helps!

Anirudhmk at 2007-9-25 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Excel Services...
# 3
hi Anirudhmk

can you tell me how to instantiate the System.Web.HttpContext?

And the "excel%20lib" is constant?

thanks

stswordman at 2007-9-25 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Excel Services...
# 4
Hi stswordman,

Its a static property. I used a custom webpart that was deployed on the site I had the excel sheet published on and so it got the current context.
The getfile url is the exact url of your published excel document.That was just the excel I was accessing.Copy and paste the url of the excel fil you have published.

Anirudhmk at 2007-9-25 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Excel Services...
# 5

Hi Anirudh,

I have similar kind of requirement, where in I am having an a excelsheet published to Excel Services which is also having Data connections to get the data and display in Pivottable and Pivot chart. My DataSource has been updated with latest data after I published the Excelsheet. I am trying to Refresh the report using Excel web services programatically and then upload the report again to Sharepoint Trusted locatio. Following is the line of code Just before getting the workbook and uploading to sharepoint.

excelService.Refresh(sessionId, "");

Do you have any idea on resolvigh this.

Thanks,

Sasya

Sasya at 2007-9-25 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Excel Services...

SharePoint Products and Technologies

Site Classified