Click or drag to resize

ExcelWorkbook Methods

The ExcelWorkbook type exposes the following members.

Methods
 NameDescription
Public methodClose Closes the workbook and releases all the resources.
Public methodDisableFormulaCalculations Disable formula calculations for all the sheets existing in the workbook at the current time.
Public methodEnableFormulaCalculations Enable formula calculations for all the sheets existing in the workbook at the current time.
Public methodFind(String) Finds the cells of all the worksheets that display the specified text, in any part of the cell and without regard to case. The text of a formula cell is its calculated result; call UpdateFormulaResult first to calculate the formulas added in code.
Public methodFind(String, ExcelFindOptions) Finds the cells of all the worksheets that display the specified text, with the specified options. The text of a formula cell is its calculated result; call UpdateFormulaResult first to calculate the formulas added in code.
Public methodStatic memberLoadFromCsv(Stream, String, ExcelWorkbookFormat) Loads a CSV stream into a worksheet. The default encoding of the text in CSV is assumed to be UTF-8. The values from CSV will be imported in the top left corner of the worksheet.
Public methodStatic memberLoadFromCsv(String, String, ExcelWorkbookFormat) Loads a CSV file into a worksheet. The default encoding of the text in CSV is assumed to be UTF-8. The values from CSV will be imported in the top left corner of the worksheet.
Public methodStatic memberLoadFromCsv(Stream, Encoding, String, Int32, Int32, ExcelWorkbookFormat, ExcelWorkbookDefaultSettings) Loads a CSV stream into a worksheet.
Public methodStatic memberLoadFromCsv(String, Encoding, String, Int32, Int32, ExcelWorkbookFormat, ExcelWorkbookDefaultSettings) Loads a CSV file into a worksheet.
Public methodReplace(String, String) Replaces a text with another text in the cells of all the worksheets that contain text, in any part of the cell and without regard to case. Formulas, numbers, dates and booleans are not changed.
Public methodReplace(String, String, ExcelFindOptions) Replaces a text with another text in the cells of all the worksheets that contain text, with the specified options. With MatchEntireCellContent the whole cell text is replaced when it is equal to the old text; otherwise every occurrence of the old text in the cell is replaced. Formulas, numbers, dates and booleans are not changed.
Public methodSave Saves the Excel workbook as byte array that can be further saved into a file or send over HTTP. The output format (Excel 97-2003 .xls or Excel 2007-2019 or above .xlsx) is the current format of the workbook.
Public methodSave(Stream)A Saves the workbook in the specified stream. The output format (Excel 97-2003 .xls or Excel 2007-2019 or above .xlsx) is the current format of the workbook.
Public methodSave(String) Saves the workbook as the specified file. The output format (Excel 97-2003 .xls or Excel 2007-2019 or above .xlsx) is the current format of the workbook.
Public methodSave(HttpResponse, String) Saves the workbook to the specified HttpResponse. The output format (Excel 97-2003 .xls or Excel 2007-2019 or above .xlsx) is the current format of the workbook.
Public methodSave(HttpResponse, String, Boolean) Saves the workbook to the specified HttpResponse. The output format (Excel 97-2003 .xls or Excel 2007-2019 or above .xlsx) is the current format of the workbook.
Public methodSaveToCsv(Int32, Stream, String) Saves the worksheet at the specified index to a stream in CSV format. The default UTF-8 text encoding is used when saving the output stream.
Public methodSaveToCsv(Int32, String, String) Saves the worksheet at the specified index to a file in CSV format. The default UTF-8 text encoding is used when saving the output file.
Public methodSaveToCsv(Int32, Stream, String, Encoding) Saves the worksheet at the specified index to a stream in CSV format using the specified text encoding for the output.
Public methodSaveToCsv(Int32, String, String, Encoding) Saves the worksheet at the specified index to a file in CSV format using the specified text encoding for the output file.
Public methodUpdateFormulaResult Calculates the results of the formulas and array formulas of all the worksheets in the workbook. The results are saved in the workbook file, for the applications that read the workbook without calculating the formulas.
Top
See Also