Class GridJsWorkbook

GridJsWorkbook class

Represents the main entry class for GridJs

public class GridJsWorkbook

Constructors

NameDescription
GridJsWorkbook()The default constructor.

Properties

NameDescription
Settings { get; set; }Represents the workbook settings.
WarningCallback { get; set; }Gets or sets warning callback for import file.

Methods

NameDescription
CopyImageOrShape(string, string)Copys image or shape.
ErrorJson(string)Gets the error message string in JSON format.
ExportToJson()Gets JSON string from memory data, the default filename in the JSON is: book1.
ExportToJson(string)Gets JSON string from memory data,set the output filename in the JSON.
ExportToJsonStringBuilder(string)Gets JSON string from memory data,set the output filename in the JSON.
GetJsonByUid(string, string)Gets the JSON string of the file from the cache using the specified unique id,set the output filename in the JSON.
GetOle(string, string, int, out string)Gets the byte array data of the embedded ole object .
ImportExcelFile(string)Imports the excel file from the file path.
ImportExcelFile(Workbook)Imports the excel file from the Workbook object.
ImportExcelFile(Stream, GridLoadFormat)Imports the excel file from file stream with load format.
ImportExcelFile(string, string)Imports the excel file from the file path.
ImportExcelFile(string, Workbook)Imports the excel file from the Workbook object.
ImportExcelFile(Stream, GridLoadFormat, string)Imports the excel file from file stream with load format and open password.
ImportExcelFile(string, Stream, GridLoadFormat)Imports the excel file from file stream.
ImportExcelFile(string, string, string)Imports the excel file from file path and open password.
ImportExcelFile(string, Stream, GridLoadFormat, string)Imports the excel file from file stream with load format and open password.
ImportExcelFileFromJson(string)Imports the excel file from JSON format string.
InsertImage(string, string, Stream, string)Inserts image in the worksheet from file stream or the URL,(either the file stream or the URL shall be provided) or Inserts shape ,when the p.type is one of AutoShapeType
JsonToStream(Stream, string)Retrieve the JSON string from memory data,set the output filename in the JSON, and write it to the stream.
JsonToStreamByUid(Stream, string, string)Retrieve the JSON string of the file from the cache using the specified unique id,set the output filename in the JSON,and write it to the stream.
LazyLoadingJson(string, string)Gets the JSON string of the specified sheet in the file from the cache using the specified unique id.
LazyLoadingStream(Stream, string, string)Retrieve the JSON string of the specified sheet in the file from the cache using the specified unique id, and write it to the stream.
MergeExcelFileFromJson(string, string)Applies a batch update to the memory data.
SaveToCacheWithFileName(string, string, string)Saves the memory data to the cache file with the specified filename and also set the open password, the save format is baseed on the file extension of the filename .
SaveToExcelFile(Stream)Saves the memory data to the sream, baseed on the origin file format.
SaveToExcelFile(string)Saves the memory data to the file path,if the file has extension ,save format is baseed on the file extension .
SaveToHtml(Stream)Saves the memory data to the sream,the save format is html
SaveToHtml(string)Saves the memory data to the file path,the save format is html.
SaveToPdf(Stream)Saves the memory data to the sream,the save format is pdf.
SaveToPdf(string)Saves the memory data to the file path,the save format is pdf.
SaveToXlsx(Stream)Saves the memory data to the sream,the save format is xlsx.
SaveToXlsx(string)Saves the memory data to the file path,the save format is xlsx.
SetInterruptMonitorForLoad(GridInterruptMonitor, int)Sets InterruptMonitor for load operation.
SetInterruptMonitorForSave(GridInterruptMonitor)Sets InterruptMonitor for save operation.
UpdateCell(string, string)Applies the update operation.
static GetGridLoadFormat(string)Gets the load format by file extension
static GetImageStream(string, string)Get Stream of image from memory data.
static GetImageUrl(string, string, string)Gets the image URL.
static GetUidForFile(string)Generates a new unique id for the file cache using the given file name.
static SetImageUrlBase(string)Set the base image get action URL from controller .

Fields

NameDescription
static CacheImpCustom implemention for cache storage,If you want to store cache in stream way ,you need to set and implement it.
static CalculateEngineCustom implemention for calculation engine ,If you want to do custom calculation, you need to set and implement it.

See Also