Click or drag to resize

ComHelperSaveWithOptions Method

Saves the spreadsheet to a file with the specified path.

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 43.0.35.1020
Syntax
public void SaveWithOptions(
	Object file,
	string path,
	Object options
)

Parameters

file
Type: SystemObject
The ExcelFile instance which to save.
path
Type: SystemString
The path to which to save the spreadsheet.
options
Type: SystemObject
The saving options which can be used to define settings for save operation.
Examples

Following code demonstrates different ways of saving ExcelFile to specified file format.

// Saves the spreadsheet to a file with the specified path
ef.Save("Report.xlsx");

using (FileStream stream = new FileStream("Report.pdf", FileMode.Create))
{
    // Saves file to the stream
    ef.Save(stream, SaveOptions.PdfDefault);
}

// Saves the file using specified save options
ef.Save("Report.html", new HtmlSaveOptions
{
    SelectionType = SelectionType.EntireFile
});
See Also