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

	gw = GridJsWorkbook()
	gws = GridWorkbookSettings()
	# Do not re-calculate all formulas on opening the file
	gws.re_calculate_on_open = False
	gw.settings = gws
	gw.import_excel_file(r"c:\test.xlsx")

Setting File Metadata

	gw = GridJsWorkbook()
	gws = GridWorkbookSettings()
	# Set author information
	gws.author = "peter"
	gw.settings = gws
	gw.import_excel_file(r"c:\test.xlsx")

Common Settings Reference

  • re_calculate_on_open: Controls whether formulas are recalculated when opening files,default is true.
  • force_full_calculate: Enables forced full calculation cycles
  • create_calc_chain: Controls whether create calculated formulas chain,default is false.
  • iteration: Controls whether use iteration to resolve circular references,default is true.
  • max_iteration: 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

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

Advanced Configuration

Batch Settings Application

	gw = GridJsWorkbook()
	gws = GridWorkbookSettings()
	# Configure multiple settings simultaneously
	gws.re_calculate_on_open = False
	gws.author = "peter"
	gws.check_custom_number_format = True
	gws.check_excel_restriction = True
	gw.settings = gws
	gw.import_excel_file(r"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-Python-via-.NET/tree/main/Examples.GridJs

Additional Resources