SharpCell

XlsxWriter

public static class XlsxWriter

Namespace SharpCell.Xlsx · package SharpCell.Xlsx

Saves a workbook as an .xlsx file: values, formulas, styles, number formats, sizes, merged cells, panes, sheets, defined names and tables. A workbook read by XlsxReader is saved into the file it was read from: everything SharpCell does not model (charts, pivot tables, comments, conditional formats, macros) is copied unchanged, and so is every cell that did not change. A workbook built in code becomes a new file. Call Workbook.Recalculate before saving.

Methods

Save(Workbook, Stream)

public static void Save(Workbook workbook, Stream stream)

Saves the workbook to a stream, which is left open.

Parameters

Exceptions

Save(Workbook, Stream, XlsxWriteOptions)

public static void Save(Workbook workbook, Stream stream, XlsxWriteOptions options)

Saves the workbook to a stream, which is left open.

Parameters

Exceptions

Save(Workbook, string)

public static void Save(Workbook workbook, string path)

Saves the workbook to a file, replacing it if it exists (the file it was read from too).

Parameters

Exceptions

Save(Workbook, string, XlsxWriteOptions)

public static void Save(Workbook workbook, string path, XlsxWriteOptions options)

Saves the workbook to a file, replacing it if it exists (the file it was read from too).

Parameters

Exceptions