How to read, update and upload excel to sharepoint using XLSIO

Hi,

I was trying out with XLSIO for a web app, my requirement is somthing like, get some existing excel templates from sharepoint, edit it(prefil data using XLSIO component) and upload(save) back to another location in sharepoint.

My query is how can i save to sharepoint using SaveAs method?Coz am not editing/saving the document locally.

Thanks,


1 Reply

SB Sathish Babu R Syncfusion Team October 25, 2010 07:08 AM UTC

Hi Malathi,

Thank you for your interest in Syncfusion products.

Currently In our XlsIO, we do not have support to save the excel file to share point directly, instead we provide support to save the excel file as stream. Please see the below code snippet. Also we have attached the sample for the same. Could you please try this sample and let us know if this helps you.


Code Snippet:

ExcelEngine excelEngine=new ExcelEngine();
FileStream fileStream = new FileStream(fileName, FileMode.Open);
IWorkbook book = excelEngine.Excel.Workbooks.Open(fileStream, ExcelOpenType.Automatic);

MemoryStream memoryStream = new MemoryStream();
book.SaveAs(memoryStream);

Sample:
F970497638497995.zip

Please, let us know if you have any queries.

Regards,
Sathish



Loader.
Up arrow icon