Spread.Sheets Documentation
Excel Export Classes

The following methods can be used when exporting to an Excel-formatted file when using the Excel assemblies.

Class Description
GrapeCity.Spread.Sheets.ExcelIO.Exporter Represents an exporter that enables a file to be exported.

 

Method Description
public Exporter(JObject spread) Creates an exporter that exports data to a file with the specified format.
Parameter  
spread The spread JSON object.

 

Method Description
public Exporter(string spreadJson) Creates an exporter with a specified JSON string.
Parameter  
spreadJson The spread JSON string.

 

Method Description
public void SaveExcel(Stream stream, ExcelFileFormat fileFormat = ExcelFileFormat.XLSX, ExcelSaveFlags saveFlags = ExcelSaveFlags.NoFlagsSet, string password = null) Saves the GCSpreadSheets to an Excel Compound Document File stream.
Parameter  
stream The saved stream.
fileFormat The saved Excel format.
saveFlags The save options for the file.
password The file password.

 

Method Description
public void SavePdf(Stream stream, PdfExportSettings settings, params int[] sheetIndexs) Saves the content of the GCSpreadSheets component to the specified stream.
Parameter  
stream The stream to which to save the data.
settings The export settings.
sheetIndexs The index of the sheet.

 

Method Description
public void SaveCsv(Stream stream, int sheetIndex = 0) Saves the sheet to the CSV (comma-separated values) file.
Parameters  
stream The stream to which to save the content.
sheetIndex The sheet index.

 

Method Description
public void SaveCsv(Stream stream, int sheetIndex = 0, TextFileSaveFlags flags = TextFileSaveFlags.None) Saves the sheet to the CSV (comma-separated values) file.
Parameter  
stream The stream to which to save the content.
sheetIndex The sheet index.
flags The export flags.

 

Method Description
public void SaveCsv(Stream stream, int sheetIndex, TextFileSaveFlags flags, Encoding encoding) Saves the sheet to the CSV (comma-separated values) file.
Parameters  
stream The stream to which to save the content.
sheetIndex The sheet index
flags The export flags.
encoding The encoding.

 

Method Description
public void SaveTextFileRange(Stream stream, int sheetIndex = 0, int row = 0, int column = 0, int rowCount = -1, int columnCount = -1, TextFileSaveFlags flags = TextFileSaveFlags.None) Saves the range of cells in the sheet as delimited text and saves to a stream with the specified delimiters and encoding.
Parameters  
stream The stream to which to save the range text.
sheetIndex The sheet index.
row The starting row index.
column The starting column index.
rowCount The number of rows.
columnCount The number of columns.
flags The export flags.
Remarks: The cell delimiter cannot be contained in a row or column delimiter.  
Exception: The cell delimiter cannot be contained in a row or column delimiter.

 

Method Description
public void SaveTextFileRange(Stream stream, int sheetIndex, int row, int column, int rowCount, int columnCount, TextFileSaveFlags flags, string rowDelimiter, string columnDelimiter, string cellDelimiter, Encoding encoding) Saves the range of cells in the sheet as delimited text and saves to a stream with the specified delimiters and encoding.
Parameters  
stream The stream to which to save the range text.
sheetIndex The sheet index.
row The starting row index.
column The starting column index.
rowCount The number of rows.
columnCount The number of columns.
flags The export flags.
rowDelimiter The row delimiter string.
columnDelimiter The column delimiter string.
cellDelimiter The cell delimiter string.
encoding The encoding.
Remarks: The cell delimiter cannot be contained in a row or column delimiter.  
Exception: The cell delimiter cannot be contained in a row or column delimiter.

 

Method Description
public void SaveHtml(Stream stream, int sheetIndex = 0) Saves the data on the sheet to the specified stream.
Parameters  
stream The HTML stream.
sheetIndex The sheet index.

 

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.