Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduced in build


Generates an Excel binary or OOXML file and saves it to a SharePoint Document Library.



The current ExcelTemplate object which is being saved.
SharePoint Document Library that contains the Excel spreadsheet being opened
Name of the output file. ExcelWriter will save the file to the document library using this name. If a file with the same name exists, it will be overwritten by the new Excel file if the overwrite parameter is set to True.
Set to True to overwrite an Excel file if one already exists by that name in the Document Library


Save will throw this exception if null (C#) or Nothing (VB.NET) is passed to the method.


ExcelWriter allows you to save in both the Excel 97-03 BIFF8 format (.xls) or the new Office Open XML (.xlsx) format. The template file must be of the expected output format. Hence, if you wish to output .xls files, you must start with a .xls template, and if you wish to output .xlsx files, you must start with a .xlsx template. ExcelWriter does not support the creation or editing of .xlsx files with the ExcelApplication object.

You can call Save more than once for a single instance of ExcelTemplate. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client.


This is an extension method for the ExcelTemplate object to be used for saving spreadsheets to SharePoint Document Libraries. To use this method, you must add a reference to SoftArtisans.OfficeWriter.ExcelWriter.SharePointIntegration.dll


  • No labels