CellsHelper class

CellsHelper class

Provides helper functions.

The CellsHelper type exposes the following members:

Properties

PropertyDescription
significant_digitsGets and sets the number of significant digits.
The default value is 17.
dpiGets the DPI of the machine.
startup_pathGets or sets the startup path, which is referred to by some external formula references.
alt_start_pathGets or sets the alternate startup path, which is referred to by some external formula references.
library_pathGets or sets the library path which is referred to by some external formula references.
custom_implementation_factoryGets or sets the factory for creating instances with special implementation.
is_cloud_platformPlease set this property True when running on a cloud platform, such as: Azure, AWSLambda, etc,

Methods

MethodDescription
create_safe_sheet_nameChecks given sheet name and create a valid one when needed.
If given sheet name conforms to the rules of excel sheet name, then return it.
Otherwise string will be truncated if length exceeds the limit
and invalid characters will be replaced with ’ ‘, then return the rebuilt string value.
create_safe_sheet_nameChecks given sheet name and create a valid one when needed.
If given sheet name conforms to the rules of excel sheet name, then return it.
Otherwise string will be truncated if length exceeds the limit
and invalid characters will be replaced with given character, then return the rebuilt string value.
get_text_widthGet width of text in unit of points.
get_versionGet the release version.
cell_name_to_indexGets the cell row and column indexes according to its name.
cell_index_to_nameGets cell name according to its row and column indexes.
column_index_to_nameGets column name according to column index.
column_name_to_indexGets column index according to column name.
row_index_to_nameGets row name according to row index.
row_name_to_indexGets row index according to row name.
convert_r1c1_formula_to_a1Converts the r1c1 formula of the cell to A1 formula.
convert_a1_formula_to_r1c1Converts A1 formula of the cell to the r1c1 formula.
get_date_time_from_doubleConvert the double value to the date time value.
get_double_from_date_timeConvert the date time to double value.
get_used_colorsGets all used colors in the workbook.
add_add_in_functionAdd addin function.
merge_filesMerges some large xls files to a xls file.
need_quote_in_formulaIndicates whether the name of the sheet should be enclosed in single quotes
init_for_dot_net_coreDo the initialization for .NetCore programme.
We suggest you to call this method for all .NetCore initialization first.
For example:
CellsHelper.InitForDotNetCore();
Workbook wb = new Workbook();

See Also