Workbook Related Settings for GridJs

Settings for GridJs

Overview

GridJs provides comprehensive configuration options through the GridWorkbookSettings class. These settings allow developers to customize various aspects of Excel file processing, including calculation behavior, metadata management, and performance optimization.

GridWorkbookSettings Class

The GridWorkbookSettings class serves as the central configuration hub for GridJs operations.

Key Configuration Areas

  • Calculation Settings: Control formula recalculation behavior
  • Metadata Management: Set file properties and author information
  • Performance Optimization: Configure caching and resource management

Basic Usage Examples

Disabling Recalculation on File Open

GridJsWorkbook gw = new GridJsWorkbook();
GridWorkbookSettings gws = new GridWorkbookSettings();
// Do not re-calculate all formulas on opening the file
gws.ReCalculateOnOpen = false;
gw.Settings = gws;
gw.ImportExcelFile(@"c:\test.xlsx");

Setting File Metadata

GridJsWorkbook gw = new GridJsWorkbook();
GridWorkbookSettings gws = new GridWorkbookSettings();
// Set author information
gws.Author = "peter";
gw.Settings = gws;
gw.ImportExcelFile(@"c:\test.xlsx");

Common Settings Reference

  • ReCalculateOnOpen: Controls whether formulas are recalculated when opening files,default is true.
  • ForceFullCalculate: Enables forced full calculation cycles
  • CreateCalcChain: Controls whether create calculated formulas chain,default is false.
  • Iteration: Controls whether use iteration to resolve circular references,default is true.
  • MaxIteration: Set the maximum number of iterations to resolve a circular reference, the default value is 100.

Metadata Settings

  • Author: Specifies the file author

Performance Settings

  • CheckCustomNumberFormat: Validates custom number format when setting Style.Custom
  • CheckExcelRestriction: Controls Whether check restriction of excel file when user modify cells related objects

Advanced Configuration

Batch Settings Application

GridJsWorkbook gw = new GridJsWorkbook();
GridWorkbookSettings gws = new GridWorkbookSettings();

// Configure multiple settings simultaneously
gws.ReCalculateOnOpen = false;
gws.Author = "peter";
gws.CheckCustomNumberFormat = true;
gws.CheckExcelRestriction = true;
gw.Settings = gws;
gw.ImportExcelFile(@"c:\test.xlsx");

Demo and Examples

For comprehensive implementation examples and detailed usage scenarios, refer to the official demo repository:

https://github.com/aspose-cells/Aspose.Cells.Grid-for-.NET/tree/main/Examples_GridJs

Additional Resources