CellsHelper

CellsHelper class

Provides helper functions.

Methods

NameDescription
getAltStartPath()Gets or sets the alternate startup path, which is referred to by some external formula references.
getCustomImplementationFactory()Gets or sets the factory for creating instances with special implementation.
getDPI()Gets the DPI of the machine.
getLibraryPath()Gets or sets the library path which is referred to by some external formula references.
getSignificantDigits()Gets and sets the number of significant digits. The default value is 17. Only could be 15 or 17 now.
getSignificantDigitsType()The value of the property is SignificantDigitsType integer constant.
getStartupPath()Gets or sets the startup path, which is referred to by some external formula references.
isCloudPlatform()Please set this property True when running on a cloud platform, such as: Azure, AWSLambda, etc,
setAltStartPath()Gets or sets the alternate startup path, which is referred to by some external formula references.
setCloudPlatform()Please set this property True when running on a cloud platform, such as: Azure, AWSLambda, etc,
setCustomImplementationFactory()Gets or sets the factory for creating instances with special implementation.
setDPI()Gets the DPI of the machine.
setLibraryPath()Gets or sets the library path which is referred to by some external formula references.
setSignificantDigits()Gets and sets the number of significant digits. The default value is 17. Only could be 15 or 17 now.
setSignificantDigitsType()The value of the property is SignificantDigitsType integer constant.
setStartupPath()Gets or sets the startup path, which is referred to by some external formula references.
addAddInFunction(function, minCountOfParameters, maxCountOfParameters, paramersType, functionValueType) (static)Add addin function. NOTE: This member is now obsolete. Instead, please use WorksheetCollection.RegisterAddInFunction() m
cellIndexToName(row, column) (static)Gets cell name according to its row and column indexes.
cellNameToIndex(cellName) (static)Gets the cell row and column indexes according to its name.
columnIndexToName(column) (static)Gets column name according to column index.
columnNameToIndex(columnName) (static)Gets column index according to column name.
convertA1FormulaToR1C1(formula, row, column) (static)Converts A1 formula of the cell to the r1c1 formula. NOTE: This member is now obsolete. Instead, please use Worksheet.Co
convertR1C1FormulaToA1(r1c1Formula, row, column) (static)Converts the r1c1 formula of the cell to A1 formula. NOTE: This member is now obsolete. Instead, please use Worksheet.Co
createSafeSheetName(nameProposal) (static)Checks given sheet name and create a valid one when needed. If given sheet name conforms to the rules of excel sheet nam
createSafeSheetName(nameProposal, replaceChar) (static)Checks given sheet name and create a valid one when needed. If given sheet name conforms to the rules of excel sheet nam
getCacheFolder() (static)
getDateTimeFromDouble(doubleValue, date1904) (static)Convert the double value to the date time value.
getDoubleFromDateTime(dateTime, date1904) (static)Convert the date time to double value.
getTextWidth(text, font, scaling) (static)Get width of text in unit of points.
getUsedColors(workbook) (static)Gets all used colors in the workbook.
getVersion() (static)Get the release version.
mergeFiles(files, cachedFile, destFile) (static)Merges some large xls files to a xls file. This method only supports merging data, style and formulas to the new file. T
needQuoteInFormula(sheetName) (static)Indicates whether the name of the sheet should be enclosed in single quotes
rowIndexToName(row) (static)Gets row name according to row index.
rowNameToIndex(rowName) (static)Gets row index according to row name.
setCacheFolder() (static)

getAltStartPath()

Gets or sets the alternate startup path, which is referred to by some external formula references.

getCustomImplementationFactory()

Gets or sets the factory for creating instances with special implementation.

getDPI()

Gets the DPI of the machine.

getLibraryPath()

Gets or sets the library path which is referred to by some external formula references.

getSignificantDigits()

Gets and sets the number of significant digits. The default value is 17. Only could be 15 or 17 now.

getSignificantDigitsType()

The value of the property is SignificantDigitsType integer constant.

getStartupPath()

Gets or sets the startup path, which is referred to by some external formula references.

isCloudPlatform()

Please set this property True when running on a cloud platform, such as: Azure, AWSLambda, etc,

setAltStartPath()

Gets or sets the alternate startup path, which is referred to by some external formula references.

setCloudPlatform()

Please set this property True when running on a cloud platform, such as: Azure, AWSLambda, etc,

setCustomImplementationFactory()

Gets or sets the factory for creating instances with special implementation.

setDPI()

Gets the DPI of the machine.

setLibraryPath()

Gets or sets the library path which is referred to by some external formula references.

setSignificantDigits()

Gets and sets the number of significant digits. The default value is 17. Only could be 15 or 17 now.

setSignificantDigitsType()

The value of the property is SignificantDigitsType integer constant.

setStartupPath()

Gets or sets the startup path, which is referred to by some external formula references.

addAddInFunction(function, minCountOfParameters, maxCountOfParameters, paramersType, functionValueType) (static)

Add addin function. NOTE: This member is now obsolete. Instead, please use WorksheetCollection.RegisterAddInFunction() methods. This method will be removed 12 months later since January 2022. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
functionStringThe function name.
minCountOfParametersNumberMinimum number of parameters this function requires
maxCountOfParametersNumberMaximum number of parameters this function allows.
paramersTypeArray of NumberThe excepted parameters type of the function
functionValueTypeNumberParameterType

cellIndexToName(row, column) (static)

Gets cell name according to its row and column indexes.

ParameterTypeDescription
rowNumberRow index.
columnNumberColumn index.

Returns: String — String Name of cell.

cellNameToIndex(cellName) (static)

Gets the cell row and column indexes according to its name.

ParameterTypeDescription
cellNameStringName of cell

Returns: Array of Number — Array of Number [0] is the row index and [1] is the column index.

columnIndexToName(column) (static)

Gets column name according to column index.

ParameterTypeDescription
columnNumberColumn index.

Returns: String — String Name of column.

columnNameToIndex(columnName) (static)

Gets column index according to column name.

ParameterTypeDescription
columnNameStringColumn name.

Returns: Number — Number Column index.

convertA1FormulaToR1C1(formula, row, column) (static)

Converts A1 formula of the cell to the r1c1 formula. NOTE: This member is now obsolete. Instead, please use Worksheet.ConvertFormulaReferenceStyle() method. This property will be removed 12 months later since August 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
formulaStringThe A1 formula.
rowNumberThe row index of the cell.
columnNumberThe column index of the cell.

Returns: String — String The R1C1 formula.

convertR1C1FormulaToA1(r1c1Formula, row, column) (static)

Converts the r1c1 formula of the cell to A1 formula. NOTE: This member is now obsolete. Instead, please use Worksheet.ConvertFormulaReferenceStyle() method. This property will be removed 12 months later since August 2023. Aspose apologizes for any inconvenience you may have experienced.

ParameterTypeDescription
r1c1FormulaStringThe r1c1 formula.
rowNumberThe row index of the cell.
columnNumberThe column index of the cell.

Returns: String — String The A1 formula.

createSafeSheetName(nameProposal) (static)

Checks 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.

ParameterTypeDescription
nameProposalStringsheet name to be used

Returns: String — String

createSafeSheetName(nameProposal, replaceChar) (static)

Checks 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.

ParameterTypeDescription
nameProposalStringsheet name to be used
replaceCharcharcharacter which will be used to replace invalid characters in given sheet name

Returns: String — String

getCacheFolder() (static)

getDateTimeFromDouble(doubleValue, date1904) (static)

Convert the double value to the date time value.

ParameterTypeDescription
doubleValueNumberThe double value.
date1904booleanDate 1904 system.

Returns: DateTime — DateTime

getDoubleFromDateTime(dateTime, date1904) (static)

Convert the date time to double value.

ParameterTypeDescription
dateTimeDateTimeThe date time.
date1904booleanDate 1904 system.

Returns: Number — Number

getTextWidth(text, font, scaling) (static)

Get width of text in unit of points.

ParameterTypeDescription
textStringThe text.
fontFontThe font of the text.
scalingNumberThe scaling of text.

Returns: Number — Number

getUsedColors(workbook) (static)

Gets all used colors in the workbook.

ParameterTypeDescription
workbookWorkbookThe workbook object.

Returns: Array ofColor — Array ofColor The used colors.

getVersion() (static)

Get the release version.

Returns: String — String The release version.

mergeFiles(files, cachedFile, destFile) (static)

Merges some large xls files to a xls file. This method only supports merging data, style and formulas to the new file. The cached file is used to store some temporary data.

ParameterTypeDescription
filesArray of StringThe files.
cachedFileStringThe cached file.
destFileStringThe dest file.

needQuoteInFormula(sheetName) (static)

Indicates whether the name of the sheet should be enclosed in single quotes

ParameterTypeDescription
sheetNameStringThe name of the sheet

Returns: boolean — boolean

rowIndexToName(row) (static)

Gets row name according to row index.

ParameterTypeDescription
rowNumberRow index.

Returns: String — String Name of row.

rowNameToIndex(rowName) (static)

Gets row index according to row name.

ParameterTypeDescription
rowNameStringRow name.

Returns: Number — Number Row index.

setCacheFolder() (static)