http://www.learningsharepoint……oint-2010/
Programatically Open\Edit\Save excel workbook in Sharepoint 2010
private void OpenandWrite_Click(object sender, EventArgs e)
{
myService = new ES.ExcelService();
myService.Credentials = System.Net.CredentialCache.DefaultCredentials;
ExService.Status[] status;
// Close the open workbook.
if (sessionId != string.Empty)
cli.CloseWorkbook(sessionId);
// Clear out the session ID.
sessionId = string.Empty;
// Finally Open the workbook for editing.
sessionId = cli.OpenWorkbookForEditing(“http://SPSite/Shared docs/mysheet.xlsx”, “”, “”, out status);
}
Connect & Join Us