aspose.cells.js
Version:
Aspose.Cells for JavaScript via C++ is a high-performance, feature-rich library for manipulating and converting Excel (XLS, XLSX, XLSB), ODS, CSV, and HTML files. It provides a comprehensive set of features for creating, editing, converting, and rendering
1,808 lines (1,749 loc) • 1.46 MB
TypeScript
// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved.
// Powered by Aspose.Cells.
/**
* The namespace of Aspose.Cells for JavaScript via C++.
*/
export namespace AsposeCells {
/**
* Monitor for interruption requests in all time-consuming operations.
*/
export abstract class AbstractInterruptMonitor {
/**
* Indicates whether interruption is requested for current operation.
* If true then current operation will be interrupted.
* Implementation should perform fast and efficient check here, otherwise it may become another bottleneck for the procedure.
*/
abstract isInterruptionRequested() : boolean;
/**
* When procedure is interrupted, whether terminate the procedure quietly or throw an Exception.
* Default is false, that is, when <see cref="IsInterruptionRequested"/> is true,
* a <see cref="CellsException"/> with code <see cref="ExceptionType.Interrupted"/> will be thrown.
*/
getTerminateWithoutException() : boolean;
}
/**
* Represents the auto fill type.
*/
export enum AutoFillType {
/**
* Copies the value and format of the source area to the target area
*/
Copy = 1,
/**
* Automatically fills the target area with the value and format.
*/
Default = 0,
/**
* Copies only the format of the source area to the target area,
*/
Formats = 3,
/**
* Extend the value in the source area to the target area in the form of a series and copy format to the target area.
*/
Series = 2,
/**
* Copies only the value of the source area to the target area,
*/
Values = 4,
}
/**
* Represents the settings of advanced filter.
*/
export class AdvancedFilter {
/**
* Gets the list range of this advanced filter.
*/
readonly listRange : string;
/**
* Gets the criteria range of this advanced filter.
*/
readonly criteriaRange : string;
/**
* Gets the range where copying the resut of this advanced filter to.
*/
readonly copyToRange : string;
}
/**
* Represents autofiltering for the specified worksheet.
*/
export class AutoFilter {
/**
* Gets the data sorter.
*/
readonly sorter : DataSorter;
/**
* Represents the range to which the specified AutoFilter applies.
*/
range : string;
/**
* Indicates whether the AutoFilter button for this column is visible.
*/
showFilterButton : boolean;
/**
* Gets the collection of the filter columns.
*/
readonly filterColumns : FilterColumnCollection;
/**
* Sets the range to which the specified AutoFilter applies.
* @param row - Row index.
* @param startColumn - Start column index.
* @param endColumn - End column Index.
*/
setRange(row: number, startColumn: number, endColumn: number) : void;
/**
* Gets the <see cref="CellArea"/> where the this AutoFilter applies to.
* @returns
* the area this filter applies to
*/
getCellArea() : CellArea;
/**
* Gets the <see cref="CellArea"/> where the specified AutoFilter applies to.
* @param refreshAppliedRange - Whether refresh the applied range. /// For the applied range of auto filter, the last row may change when cells data changes. /// If this flag is true, then the last row of the range will be re-calculated according to current cells data.
* @returns
* the area this filter applies to
*/
getCellArea(refreshAppliedRange: boolean) : CellArea;
/**
* Adds a filter for a filter column.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param criteria - The specified criteria (a string; for example, "101"). /// It only can be null or be one of the cells' value in this column.
*
* @remarks
* MS Excel 2007 supports multiple selection in a filter column.
*/
addFilter(fieldIndex: number, criteria: string) : void;
/**
* Adds a date filter.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param dateTimeGroupingType - The grouping type
* @param year - The year.
* @param month - The month.
* @param day - The day.
* @param hour - The hour.
* @param minute - The minute.
* @param second - The second.
*
* @remarks
* If DateTimeGroupingType is Year, only the param year effects.
* If DateTiemGroupingType is Month, only the param year and month effect.
*/
addDateFilter(fieldIndex: number, dateTimeGroupingType: DateTimeGroupingType, year: number, month: number, day: number, hour: number, minute: number, second: number) : void;
/**
* Removes a date filter.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param dateTimeGroupingType - The grouping type
* @param year - The year.
* @param month - The month.
* @param day - The day.
* @param hour - The hour.
* @param minute - The minute.
* @param second - The second.
*
* @remarks
* If DateTimeGroupingType is Year, only the param year effects.
* If DateTiemGroupingType is Month, only the param year and month effect.
*/
removeDateFilter(fieldIndex: number, dateTimeGroupingType: DateTimeGroupingType, year: number, month: number, day: number, hour: number, minute: number, second: number) : void;
/**
* Removes a filter for a filter column.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param criteria - The specified criteria (a string; for example, "101"). /// It only can be null or be one of the cells' value in this column.
*/
removeFilter(fieldIndex: number, criteria: string) : void;
/**
* Remove the specific filter.
* @param fieldIndex - The specific filter index
*/
removeFilter(fieldIndex: number) : void;
/**
* Filters a list with specified criteria.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param criteria - The specified criteria (a string; for example, "101").
*
* @remarks
* Aspose.Cells will remove all other filter setting on this field as Ms Excel 97-2003.
*/
filter(fieldIndex: number, criteria: string) : void;
/**
* Filter the top 10 item in the list
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param isTop - Indicates whether filter from top or bottom
* @param isPercent - Indicates whether the items is percent or count
* @param itemCount - The item count
*/
filterTop10(fieldIndex: number, isTop: boolean, isPercent: boolean, itemCount: number) : void;
/**
* Adds a dynamic filter.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param dynamicFilterType - Dynamic filter type.
*/
dynamic_Filter(fieldIndex: number, dynamicFilterType: DynamicFilterType) : void;
/**
* Adds a font color filter.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param color - The <see cref="CellsColor"/> object.
*/
addFontColorFilter(fieldIndex: number, color: CellsColor) : void;
/**
* Adds a fill color filter.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param pattern - The background pattern type.
* @param foregroundColor - The foreground color.
* @param backgroundColor - The background color.
*/
addFillColorFilter(fieldIndex: number, pattern: BackgroundType, foregroundColor: CellsColor, backgroundColor: CellsColor) : void;
/**
* Adds an icon filter.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param iconSetType - The icon set type.
* @param iconId - The icon id.
*
* @remarks
* Only supports to add the icon filter.
* Not supports checking which row is visible if the filter is icon filter.
*/
addIconFilter(fieldIndex: number, iconSetType: IconSetType, iconId: number) : void;
/**
* Match all blank cell in the list.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
*/
matchBlanks(fieldIndex: number) : void;
/**
* Match all not blank cell in the list.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
*/
matchNonBlanks(fieldIndex: number) : void;
/**
* Filters a list with a custom criteria.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param operatorType1 - The filter operator type
* @param criteria1 - The custom criteria
*/
custom(fieldIndex: number, operatorType1: FilterOperatorType, criteria1: VObject) : void;
/**
* Filters a list with custom criteria.
* @param fieldIndex - The integer offset of the field on which you want to base the filter /// (from the left of the list; the leftmost field is field 0).
* @param operatorType1 - The filter operator type
* @param criteria1 - The custom criteria
* @param isAnd -
* @param operatorType2 - The filter operator type
* @param criteria2 - The custom criteria
*/
custom(fieldIndex: number, operatorType1: FilterOperatorType, criteria1: VObject, isAnd: boolean, operatorType2: FilterOperatorType, criteria2: VObject) : void;
/**
* Unhide all rows.
*/
showAll() : void;
/**
* Refresh auto filters to hide or unhide the rows.
* @returns
* Returns all hidden rows' indexes.
*/
refresh() : number[];
/**
* Gets all hidden rows' indexes.
* @param hideRows - If true, hide the filtered rows.
* @returns
* Returns all hidden rows indexes.
*/
refresh(hideRows: boolean) : number[];
}
/**
* Represents the category of the filter.
*/
export enum FilterCategory {
/**
* No Filter.
*/
None = 0,
/**
* Caption Filter.
*/
Label = 1,
/**
* Number Value Filter.
*/
NumberValue = 2,
/**
* Date Value Filter.
*/
Date = 3,
/**
* Top10 Value Filter.
*/
Top10 = 4,
}
/**
* Represents the type of auto fitting merged cells.
*/
export enum AutoFitMergedCellsType {
/**
* Ignore merged cells.
*
* @remarks
* Default.
*/
None = 0,
/**
* Only expands the height of the first row.
*/
FirstLine = 1,
/**
* Only expands the height of the last row.
*/
LastLine = 2,
/**
* Expands the height of each row.
*/
EachLine = 3,
}
/**
* Represents the type of auto fitting wrapped text.
*/
export enum AutoFitWrappedTextType {
/**
* Works as MS Excel.
*/
Default = 0,
/**
* Auto fit width with the longest paragraph.
*/
Paragraph = 1,
}
/**
* Enumerates all Monochromatic Palettes used in Excel chart.
*/
export enum ChartColorPaletteType {
/**
* accent1 theme color gradient, dark to light.
*/
MonochromaticPalette1 = 1,
/**
* accent2 theme color gradient, dark to light.
*/
MonochromaticPalette2 = 2,
/**
* accent3 theme color gradient, dark to light.
*/
MonochromaticPalette3 = 3,
/**
* accent4 theme color gradient, dark to light.
*/
MonochromaticPalette4 = 4,
/**
* accent5 theme color gradient, dark to light.
*/
MonochromaticPalette5 = 5,
/**
* accent6 theme color gradient, dark to light.
*/
MonochromaticPalette6 = 6,
/**
* accent7 theme color gradient.
*/
MonochromaticPalette7 = 7,
/**
* accent1 theme color gradient, light to dark.
*/
MonochromaticPalette8 = 8,
/**
* accent2 theme color gradient, light to dark.
*/
MonochromaticPalette9 = 9,
/**
* accent3 theme color gradient, light to dark.
*/
MonochromaticPalette10 = 10,
/**
* accent4 theme color gradient, light to dark.
*/
MonochromaticPalette11 = 11,
/**
* accent5 theme color gradient, light to dark.
*/
MonochromaticPalette12 = 12,
/**
* accent6 theme color gradient, light to dark.
*/
MonochromaticPalette13 = 13,
}
/**
* Represents custom settings during rendering.
*/
export class CustomRenderSettings {
/**
* Ctor.
*/
constructor();
/**
* Specifies cell border width according to border type.
* @param borderType - cell border type
* @returns
* cell border width
*
* @remarks
* Any negative value will be ignored.
*/
getCellBorderWidth(borderType: CellBorderType) : number;
}
/**
* Represents the embedded font type in html.
*/
export enum HtmlEmbeddedFontType {
/**
* Not embed font.
*/
None = 0,
/**
* Embed WOFF font.
*/
Woff = 1,
}
/**
* Represents the embedded font type in Svg image.
*/
export enum SvgEmbeddedFontType {
/**
* Not Embed font.
*/
None = 0,
/**
* Embed WOFF font.
*/
Woff = 1,
}
/**
* Options for generating Svg image.
*/
export class SvgImageOptions extends ImageOrPrintOptions {
/**
* Ctor.
*/
constructor();
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: ImageOrPrintOptions);
/**
* Gets or sets the format of the generated images.
* default value: PNG.
*/
getImageType() : ImageType;
/**
* Gets or sets the format of the generated images.
* default value: PNG.
* @param value - The value to set.
*/
setImageType(value: ImageType) : void;
/**
* if this property is true, the generated svg will fit to view port.
*/
fitToViewPort : boolean;
/**
* Gets and sets the prefix of the css name in svg,the default value is empty string.
*/
cssPrefix : string;
/**
* Gets or sets the type of font that embedded in Svg.
*
* @remarks
* Default value is <see cref="SvgEmbeddedFontType.None"/> which indicates that it will not embed font in Svg.
*/
embeddedFontType : SvgEmbeddedFontType;
}
/**
* Specifies the value type of <see cref="ShapePathPoint"/> object
*/
export enum ShapePathPointValueType {
/**
* Specifies the type of the object is location coordinates.
* The <see cref="ShapePathPoint"/> object stores the coordinate values of a point.
*/
Position = 0,
/**
* Specifies the type of the object is angle markers.
* The <see cref="ShapePathPoint"/> object stores the start and end angles of the arc.
*/
Angle = 1,
}
/**
* Represents data infomation of font file data.
*/
export class FontFileDataInfo {
/**
* Gets binary data of font file.
*/
readonly data : Uint8Array;
/**
* Gets font format type of font file.
*/
readonly formatType : FontFileFormatType;
}
/**
* Represents font format type.
*/
export enum FontFileFormatType {
/**
* Unknown font format type.
*/
Unknown = 0,
/**
* TTF font format type.
*/
Ttf = 1,
/**
* OTF font format type.
*/
Otf = 2,
/**
* TTC font format type.
*/
Ttc = 3,
}
/**
* Monitor for user to track the change of formulas during certain operations.
*
* @remarks
* For example, while deleting/inserting range of cells,
* formulas of other cells may be changed because of the shift of references.
* Please note, methods in the monitor may be invoked multiple times
* for one object which contains the formula.
*/
export abstract class AbstractFormulaChangeMonitor {
/**
* The event that will be triggered when the formula in a cell is changed.
* @param sheetIndex - The sheet index of the changed cell
* @param rowIndex - The row index of the changed cell
* @param columnIndex - The column index of the changed cell
*/
onCellFormulaChanged(sheetIndex: number, rowIndex: number, columnIndex: number) : void;
/**
* The event that will be triggered when the formula of FormatCondition is changed.
* @param fc - The FormatCondition object whose formula is changed
*/
onFormatConditionFormulaChanged(fc: FormatCondition) : void;
}
/**
* Utility for instantiating classes of Cells model.
*/
export class CellsFactory {
/**
* Default Constructor.
*/
constructor();
/**
* Creates a new style.
* @returns
* Returns a style object.
*/
createStyle() : Style;
}
/**
* Represents the cell value and corresponding type.
*/
export class CellValue {
/**
* Default Constructor.
*/
constructor();
/**
* Gets/sets the type of cell value.
*/
type : CellValueType;
/**
* Gets/sets the cell value.
*
* @remarks
* The value must be of the correct type of object corresponding to the <see cref="Type"/>:
* <list type="table">
* <listheader>
* <description>Type</description>
* <description>Value</description>
* </listheader>
* <item>
* <description><see cref="CellValueType.IsNull"/></description>
* <description>null, any other object will be ignored</description>
* </item>
* <item>
* <description><see cref="CellValueType.IsNumeric"/></description>
* <description>double</description>
* </item>
* <item>
* <description><see cref="CellValueType.IsDateTime"/></description>
* <description>DateTime</description>
* </item>
* <item>
* <description><see cref="CellValueType.IsString"/></description>
* <description>string</description>
* </item>
* <item>
* <description><see cref="CellValueType.IsBool"/></description>
* <description>bool</description>
* </item>
* <item>
* <description><see cref="CellValueType.IsError"/></description>
* <description>error string such as "#VALUE!", "#NAME?", ...</description>
* </item>
* </list>
*/
value : VObject;
}
/**
* Represents axis bins
*/
export class AxisBins {
/**
* Indicates whether grouping data by category
*/
isByCategory : boolean;
/**
* Indicates whether the axis bins are automatic.
*/
isAutomatic : boolean;
/**
* Gets or sets the width of axis bin
*/
width : number;
/**
* Gets or set the count of axis bins
*/
count : number;
/**
* Gets or set the overflow of axis bins
*/
overflow : number;
/**
* Gets or set the underflow of axis bins
*/
underflow : number;
/**
* Reset the overflow
*
* @remarks
* NOTE: This method is now obsolete.
* This is an internal method that does not need to be called externally to avoid causing problems.
* This property will be removed 12 months later since July 2024.
* Aspose apologizes for any inconvenience you may have experienced.
* @deprecated
* This is an internal method.
*/
resetOverflow() : void;
/**
* Reset the underflow
*
* @remarks
* NOTE: This method is now obsolete.
* This is an internal method that does not need to be called externally to avoid causing problems.
* This property will be removed 12 months later since July 2024.
* Aspose apologizes for any inconvenience you may have experienced.
* @deprecated
* This is an internal method.
*/
resetUnderflow() : void;
}
/**
* Represents the options for calculating chart.
*/
export class ChartCalculateOptions {
/**
* Creates the options for calculating chart.
*/
constructor();
/**
* Whether update all data points when performing the chart calculation. Default: False.
* When you want to get the value for each data point in the chart specifically, set it to true.
* If this parameter is set to True, the new data points may be generated when chart is calculated. This could make the Excel file larger.
*/
updateAllPoints : boolean;
}
/**
* Represents the globalization settings for chart.
*/
export class ChartGlobalizationSettings {
/**
* Default Constructor.
*/
constructor();
/**
* Gets the name of Series in the Chart.
*/
getSeriesName() : string;
/**
* Gets the name of Chart Title.
*/
getChartTitleName() : string;
/**
* Gets the name of increase for Legend.
*/
getLegendIncreaseName() : string;
/**
* Gets the name of Decrease for Legend.
*/
getLegendDecreaseName() : string;
/**
* Gets the name of Total for Legend.
*/
getLegendTotalName() : string;
/**
* Gets the name of Title for Axis.
*/
getAxisTitleName() : string;
/**
* Gets the name of "Other" labels for Chart.
*/
getOtherName() : string;
/**
* Gets the Name of Axis Unit.
*/
getAxisUnitName(type: DisplayUnitType) : string;
}
/**
* Represents the text direction type of the chart.
*/
export enum ChartTextDirectionType {
/**
* Horizontal direction type.
*/
Horizontal = 0,
/**
* Vertical direction type.
*/
Vertical = 1,
/**
* Rotate 90 angle.
*/
Rotate90 = 2,
/**
* Rotate 270 angle.
*/
Rotate270 = 3,
/**
* Stacked text.
*/
Stacked = 4,
}
/**
* Represents the type of data plot by row or column.
*/
export enum PlotDataByType {
/**
* By row.
*/
Row = 0,
/**
* By column.
*/
Column = 1,
}
/**
* Represents the text alignment type for the tick labels on the axis
*/
export enum TickLabelAlignmentType {
/**
* Represents the text shall be centered.
*/
Center = 0,
/**
* Represents the text shall be left justified.
*/
Left = 1,
/**
* Represents the text shall be right justified.
*/
Right = 2,
}
/**
* Represents a tick label in the chart.
*/
export class TickLabelItem {
/**
* X coordinates of Ticklabel item in ratio of chart width.
*/
readonly x : number;
/**
* Y coordinates of Ticklabel item in ratio of chart height.
*/
readonly y : number;
/**
* Width of Ticklabel item in ratio of chart width.
*/
readonly width : number;
/**
* Height of Ticklabel item in ratio of chart height.
*/
readonly height : number;
}
/**
* Represents how export OfficeMath to HTML.
*/
export enum HtmlOfficeMathOutputType {
/**
* Converts OfficeMath to HTML as image specified by <img> tag.
*/
Image = 0,
/**
* Converts OfficeMath to HTML using MathML.
*/
MathML = 1,
}
/**
* Specifies the method used to binarize image.
*/
export enum ImageBinarizationMethod {
/**
* Specifies threshold method.
*/
Threshold = 0,
/**
* Specifies dithering using Floyd-Steinberg error diffusion method.
*/
FloydSteinbergDithering = 1,
}
/**
* Represents comment title type while rendering when comment is set to display at end of sheet.
*/
export enum CommentTitleType {
/**
* Represents comment title cell.
*/
Cell = 0,
/**
* Represents comment title comment.
*/
Comment = 1,
/**
* Represents comment title note.
*/
Note = 2,
/**
* Represents comment title reply.
*/
Reply = 3,
}
/**
* Font for rendering.
*/
export class RenderingFont {
/**
* Initializes a new instance of the <see cref="RenderingFont"/>
* @param fontName - font name
* @param fontSize - font size in points
*/
constructor(fontName: string, fontSize: number);
/**
* Gets name of the font.
*/
readonly name : string;
/**
* Gets size of the font in points.
*/
readonly size : number;
/**
* Gets or sets bold for the font.
*/
bold : boolean;
/**
* Gets or sets italic for the font.
*/
italic : boolean;
/**
* Gets or sets color for the font.
*/
color : Color;
}
/**
* Watermark for rendering.
*/
export class RenderingWatermark {
/**
* Creates instance of image watermark.
* @param imageData -
*/
constructor(imageData: Uint8Array);
/**
* Creates instance of text watermark.
* @param text - watermark text
* @param renderingFont - watermark font
*/
constructor(text: string, renderingFont: RenderingFont);
/**
* Gets or sets roation of the watermark in degrees.
*/
rotation : number;
/**
* Gets or sets scale relative to target page in percent.
*/
scaleToPagePercent : number;
/**
* Gets or sets opacity of the watermark in range [0, 1].
*/
opacity : number;
/**
* Indicates whether the watermark is placed behind page contents.
*/
isBackground : boolean;
/**
* Gets text of the watermark.
*/
readonly text : string;
/**
* Gets font of the watermark.
*/
readonly font : RenderingFont;
/**
* Gets image of the watermark.
*/
readonly image : Uint8Array;
/**
* Gets or sets horizontal alignment of the watermark to the page.
*
* @remarks
* Only Left, Center, Right is valid. Default is Left.
*/
hAlignment : TextAlignmentType;
/**
* Gets or sets vertical alignment of the watermark to the page.
*
* @remarks
* Only Top, Center, Bottom is valid. Default is Top.
*/
vAlignment : TextAlignmentType;
/**
* Gets or sets offset value to <see cref="HAlignment"/>
*/
offsetX : number;
/**
* Gets or sets offset value to <see cref="VAlignment"/>
*/
offsetY : number;
}
/**
* Describes a set of sheets.
*/
export class SheetSet {
/**
* Creates a sheet set based on exact sheet indexes.
* @param sheetIndexes - zero based sheet indexes.
*
* @remarks
* If a sheet is encountered that is not in the workbook, an exception will be thrown during rendering.
*/
constructor(sheetIndexes: number[]);
/**
* Creates a sheet set based on exact sheet names.
* @param sheetNames - sheet names.
*
* @remarks
* If a sheet is encountered that is not in the workbook, an exception will be thrown during rendering.
*/
constructor(sheetNames: string[]);
/**
* Gets a set with active sheet of the workbook.
*/
static readonly active : SheetSet;
/**
* Gets a set with visible sheets of the workbook in their original order.
*/
static readonly visible : SheetSet;
/**
* Gets a set with all sheets of the workbook in their original order.
*/
static readonly all : SheetSet;
}
/**
* Represents which kind of rows should be ajusted.
*
* @remarks
*/
export enum AdjustFontSizeForRowType {
/**
* No adjsut.
*/
None = 0,
/**
* If the row is empty, change font size to fit row height.
*/
EmptyRows = 1,
}
/**
* Represents the type when exporting to slides.
*/
export enum SlideViewType {
/**
* Exporting as view in MS Excel.
*/
View = 0,
/**
* Exporting as printing.
*/
Print = 1,
}
/**
* Represents the setting of deleting blank cells/rows/columns.
*/
export class DeleteBlankOptions extends DeleteOptions {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: DeleteOptions);
/**
* Default Constructor.
*/
constructor();
/**
* Whether one cell will be taken as blank when its value is empty string.
* Default value is true.
*/
emptyStringAsBlank : boolean;
/**
* Whether one cell will be taken as blank when it is formula and the calculated result is null or empty string.
* Default value is false.
*
* @remarks
* Generally user should make sure the formulas have been calculated before deleting operation with this property as true.
* Otherwise all newly cretaed formulas by normal apis such as <see cref="Cell.Formula"/> will be taken as blank and may be deleted
* because before calculation their calculated results are all null.
*/
emptyFormulaValueAsBlank : boolean;
/**
* Whether drawing related objects such as picture, shape, chart... will be taken as blank.
* Default value is true.
*
* @remarks
* When setting this property as false,
* all rows/columns covered by drawing objects will not be taken as blank and will not be deleted.
*/
drawingsAsBlank : boolean;
/**
* Indicates how to process merged cells when deleting blank rows/columns.
*
* @remarks
* For <see cref="MergedCellsShrinkType.KeepHeaderOnly"/>, all cells in it will be taken as blank except the non-blank top-left cell. It is the default value of this property.<br></br>
* For <see cref="MergedCellsShrinkType.None"/>, all cells in it will be taken as non-blank.<br></br>
* For <see cref="MergedCellsShrinkType.ShrinkToFit"/>, all cells outside the content display area will be taken as blank.<br></br>
*/
mergedCellsShrinkType : MergedCellsShrinkType;
/**
* Specifies the start row/column index of the range to check and delete blank rows/columns.
*/
startIndex : number;
/**
* Specifies the end row/column index(inclusive) of the range to check and delete blank rows/columns.
* Default value is -1 and -1 means the maximum range of all objects(cells, drawings, ...) that need to be checked.
*/
endIndex : number;
}
/**
* Represents the strategy to shrink merged cells for operations such as deleting blank rows/column.
*/
export enum MergedCellsShrinkType {
/**
* Leaves the merged cells as it is without any modification.
*/
None = 0,
/**
* Shrinks the merged area if needed, by removing rows from the bottom or columns from the right,
* while ensuring all content remains visible.
*/
ShrinkToFit = 1,
/**
* Only keeps the header rows/columns of the merged area when the top-left cell of the merged area is not blank.
*/
KeepHeaderOnly = 2,
}
/**
* Represents the data model.
*/
export class DataModel {
/**
* Gets all relationships of the tables in the data model.
*/
readonly relationships : DataModelRelationshipCollection;
/**
* Gets all tables in the data model.
*/
readonly tables : DataModelTableCollection;
}
/**
* Represents a single relationship in the spreadsheet data model.
*/
export class DataModelRelationship {
/**
* Gets the name of the foreign key table for this relationship.
*/
readonly foreignKeyTable : string;
/**
* Gets the name of the primary key table for this relationship.
*/
readonly primaryKeyTable : string;
/**
* Gets the name of the foreign key table column for this relationship.
*/
readonly foreignKeyColumn : string;
/**
* Gets the name of the primary key table column for this relationship.
*/
readonly primaryKeyColumn : string;
}
/**
* Represents the relationships.
*/
export class DataModelRelationshipCollection {
/**
* Gets the relationship.
* @param index - The index.
*/
get(index: number) : DataModelRelationship;
/**
* Gets the number of elements contained in.
*/
readonly count : number;
}
/**
* Represents properties of a single table in spreadsheet data model.
*/
export class DataModelTable {
/**
* Gets the id of the data model table.
*/
readonly id : string;
/**
* Gets the name of the data model table.
*/
readonly name : string;
/**
* Gets the connection name of the data model table.
*/
readonly connectionName : string;
}
/**
* Represents the list of the data model table.
*/
export class DataModelTableCollection {
/**
* Gets the data model table by position of the collection.
* @param index - The position of the collection.
*/
get(index: number) : DataModelTable;
/**
* Gets the data model table by the name.
* @param name - The name of data model table.
*/
get(name: string) : DataModelTable;
/**
* Gets the number of elements contained in.
*/
readonly count : number;
}
/**
* Represents the preset theme gradient type.
*/
export enum PresetThemeGradientType {
/**
* Light gradient
*/
LightGradient = 0,
/**
* Top spotlight
*/
TopSpotlight = 1,
/**
* Medium gradient
*/
MediumGradient = 2,
/**
* Bottom spotlight
*/
BottomSpotlight = 3,
/**
* Radial gradient
*/
RadialGradient = 4,
}
/**
* Represents the shape guide.
*/
export class BaseShapeGuide {
}
/**
* just for vml
* Encapsulates a shape guide specifies the presence of a shape
* guide that will be used to govern the geometry of the specified shape
*/
export class VmlShapeGuide extends BaseShapeGuide {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: BaseShapeGuide);
}
/**
* Specifies the signature type.
*/
export enum SignatureType {
/**
* The default value , the corresponding ProviderId value is fixed to {0000000000-0000-0000-0000-0000000000}.
*/
Default = 0,
/**
* The corresponding ProviderId value is usually {000CD6A4-0000-0000-C000-000000000046}.
*/
Stamp = 1,
/**
* The corresponding ProviderId value usually needs to be set by the user. it should be obtained from the documentation shipped with the provider.
*/
Custom = 3,
}
/**
* Type of combining characters.
*/
export enum EquationCombiningCharacterType {
/**
* Use unknown type when not found in existing type.
*/
Unknown = -1,
/**
* "̇" Unicode: u0307
* Combining Dot Above
*/
DotAbove = 0,
/**
* "̈" Unicode: u0308
* Combining Diaeresis
*/
Diaeresis = 1,
/**
* "⃛" Unicode: u20db
* Combining Three Dots Above
*/
ThreeDotsAbove = 2,
/**
* "̂" Unicode: u0302
* Combining Circumflex Accent
*/
CircumflexAccent = 3,
/**
* "̌" Unicode: u030c
* Combining Caron
*/
Caron = 4,
/**
* "́" Unicode: u0301
* Combining Acute Accent
*/
AcuteAccent = 5,
/**
* "̀" Unicode: u0300
* Combining Grave Accent
*/
GraveAccent = 6,
/**
* "̆" Unicode: u0306
* Combining Combining Breve
*/
Breve = 7,
/**
* "̃" Unicode: u0303
* Combining Tilde
*/
Tilde = 8,
/**
* "̅" Unicode: u0305
* Combining Overline
*/
Overline = 9,
/**
* "̿" Unicode: u033f
* Combining Double Overline
*/
DoubleOverline = 10,
/**
* "⏞" Unicode: u23de
* Combining Top Curly Bracket
*/
TopCurlyBracket = 11,
/**
* "⏟" Unicode: u23df
* Combining Bottom Curly Bracket
*/
BottomCurlyBracket = 12,
/**
* "⃖" Unicode: u20d6
* Combining Left Arrow Above
*/
LeftArrowAbove = 13,
/**
* "⃗" Unicode: u20d7
* Combining Right Arrow Above
*/
RightArrowAbove = 14,
/**
* "⃡" Unicode: u20e1
* Combining Left Right Arrow Above
*/
LeftRightArrowAbove = 15,
/**
* "⃐" Unicode: u20d0
* Combining Left Harpoon Above
*/
LeftHarpoonAbove = 16,
/**
* "⃑" Unicode: u20d1
* Combining Right Harpoon Above
*/
RightHarpoonAbove = 17,
/**
* "←" Unicode: u2190
* Leftwards Arrow
*/
LeftwardsArrow = 18,
/**
* "→" Unicode: u2192
* Rightwards Arrow
*/
RightwardsArrow = 19,
/**
* "↔" Unicode: u2194
* Left Right Arrow
*/
LeftRightArrow = 20,
/**
* "⇐" Unicode: u21d0
* Leftwards Double Arrow
*/
LeftwardsDoubleArrow = 21,
/**
* "⇒" Unicode: u21d2
* Rightwards Double Arrow
*/
RightwardsDoubleArrow = 22,
/**
* "⇔" Unicode: u21d4
* Left Right Double Arrow
*/
LeftRightDoubleArrow = 23,
}
/**
* Mathematical Operators Type
*/
export enum EquationMathematicalOperatorType {
/**
* Use unknown type when not found in existing type.
*/
Unknown = -1,
/**
* "∀" Unicode:\u2200
*/
ForAll = 0,
/**
* "∁" Unicode:\u2201
*/
Complement = 1,
/**
* "∂" Unicode:\u2202
*/
PartialDifferential = 2,
/**
* "∃" Unicode:\u2203
*/
Exists = 3,
/**
* "∄" Unicode:\u2204
*/
NotExists = 4,
/**
* "∅" Unicode:\u2205
*/
EmptySet = 5,
/**
* "∆" Unicode:\u2206
*/
Increment = 6,
/**
* "∇" Unicode:\u2207
*/
Nabla = 7,
/**
* "∈" Unicode:\u2208
*/
ElementOf = 8,
/**
* "∉" Unicode:\u2209
*/
NotAnElementOf = 9,
/**
* "∊" Unicode:\u220a
*/
SmallElementOf = 10,
/**
* "∋" Unicode:\u220b
*/
Contain = 11,
/**
* "∌" Unicode:\u220c
*/
NotContain = 12,
/**
* "∍" Unicode:\u220d
*/
SmallContain = 13,
/**
* "∎" Unicode:\u220e
*/
EndOfProof = 14,
/**
* "∏" Unicode:\u220f
*/
NaryProduct = 15,
/**
* "∐" Unicode:\u2210
*/
NaryCoproduct = 16,
/**
* "∑" Unicode:\u2211
*/
NarySummation = 17,
/**
* "∧" Unicode:\u2227
*/
LogicalAnd = 18,
/**
* "∨" Unicode:\u2228
*/
LogicalOr = 19,
/**
* "∩" Unicode:\u2229
*/
Intersection = 20,
/**
* "∪" Unicode:\u222a
*/
Union = 21,
/**
* "∫" Unicode:\u222b
*/
Integral = 22,
/**
* "∬" Unicode:\u222c
*/
DoubleIntegral = 23,
/**
* "∭" Unicode:\u222d
*/
TripleIntegral = 24,
/**
* "∮" Unicode:\u222e
*/
ContourIntegral = 25,
/**
* "∯" Unicode:\u222f
*/
SurfaceIntegral = 26,
/**
* "∰" Unicode:\u2230
*/
VolumeIntegral = 27,
/**
* "∱" Unicode:\u2231
*/
Clockwise = 28,
/**
* "∲" Unicode:\u2232
*/
ClockwiseContourIntegral = 29,
/**
* "∳" Unicode:\u2233
*/
AnticlockwiseContourIntegral = 30,
/**
* "⋀" Unicode:\u22c0
*/
NaryLogicalAnd = 31,
/**
* "⋁" Unicode:\u22c1
*/
NaryLogicalOr = 32,
/**
* "⋂" Unicode:\u22c2
*/
NaryIntersection = 33,
/**
* "⋃" Unicode:\u22c3
*/
NaryUnion = 34,
}
/**
* This specifies the default vertical justification of equations in the document.
*/
export enum EquationVerticalJustificationType {
/**
* top
*/
Top = 0,
/**
* center
*/
Center = 1,
/**
* bottom
*/
Bottom = 2,
}
/**
* Specifies the Equation-Array function, an object consisting of one or more equations.
*/
export class ArrayEquationNode extends EquationNode {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: EquationNode);
/**
* Determine whether the current equation node is equal to the specified node
* @param obj - The specified node
*/
equals(obj: VObject) : boolean;
}
/**
* This class specifies the Function-Apply equation, which consists of a function name and an argument acted upon.
* The types of the name and argument components are 'EquationNodeType.FunctionName' and 'EquationNodeType.Base' respectively.
*/
export class FunctionEquationNode extends EquationNode {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: EquationNode);
/**
* Determine whether the current equation node is equal to the specified node
* @param obj - The specified node
*/
equals(obj: VObject) : boolean;
}
/**
* This class specifies the Group-Character function, consisting of a character drawn above or below text, often with the purpose of visually grouping items.
*/
export class GroupCharacterEquationNode extends EquationNode {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: EquationNode);
/**
* Specifies a symbol(default U+23DF).
* It is strongly recommended to use attribute ChrType to set accent character.
* Use this property setting if you cannot find the character you need in a known type.
*
* @remarks
* It should be noted that this property only accepts one character, and if multiple characters are passed in, only the first character is accepted.
*/
groupChr : string;
/**
* Specify combining characters by type value.
*/
chrType : EquationCombiningCharacterType;
/**
* This attribute specifies the position of the character in the object
*/
position : EquationCharacterPositionType;
/**
* This attribute, combined with pos of groupChrPr, specifies the vertical layout of the groupChr object. Where pos specifies the position of the grouping character, vertJc specifies the alignment of the object with respect to the baseline.
*/
vertJc : EquationCharacterPositionType;
/**
* Determine whether the current equation node is equal to the specified node
* @param obj - The specified node
*/
equals(obj: VObject) : boolean;
}
/**
* This class specifies the limit function.
*/
export class LimLowUppEquationNode extends EquationNode {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: EquationNode);
/**
* Determine whether the current equation node is equal to the specified node
* @param obj - The specified node
*/
equals(obj: VObject) : boolean;
}
/**
* This class specifies an equation or mathematical expression. All mathematical text of equations or mathematical expressions are contained by this class.
*/
export class MathematicalEquationNode extends EquationNode {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: EquationNode);
/**
* Determine whether the current equation node is equal to the specified node
* @param obj - The specified node
*/
equals(obj: VObject) : boolean;
}
/**
* This class specifies the Matrix equation, consisting of one or more elements laid out in one or more rows and one or more columns.
*/
export class MatrixEquationNode extends EquationNode {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: EquationNode);
/**
* This attribute specifies the justification of the matrix. Text outside of the matrix can be aligned with the bottom, top, or center of a matrix function. Default, the matrix assumes center justification.
*/
baseJc : EquationVerticalJustificationType;
/**
* This attribute specifies the Hide Placeholders property on a matrix. When this property is on, placeholders do not appear in the matrix.Default, placeholders do appear such that the locations where text can be inserted are made visible.
*/
isHidePlaceholder : boolean;
/**
* Determine whether the current equation node is equal to the specified node
* @param obj - The specified node
*/
equals(obj: VObject) : boolean;
}
/**
* Represents the text options of the shape
*/
export class TextBoxOptions {
/**
* It corresponds to "Format Shape - Text Options - Text Box - Vertical Alignment" in Excel.
*/
shapeTextVerticalAlignment : ShapeTextVerticalAlignmentType;
/**
* Indicates whether to resize the shape to fit the text
*/
resizeToFitText : boolean;
/**
* Gets or sets the text display direction within a given text body.
* It corresponds to "Format Shape - Text Options - Text Box - Text direction" in Excel
*/
shapeTextDirection : TextVerticalType;
/**
* Gets and sets the left margin in unit of Points.
*/
leftMarginPt : number;
/**
* Gets and sets the right margin in unit of Points.
*/
rightMarginPt : number;
/**
* Gets and sets the top margin in unit of Points.
*/
topMarginPt : number;
/**
* Returns the bottom margin in unit of Points
*/
bottomMarginPt : number;
/**
* Whether allow text to overflow shape.
*/
allowTextToOverflow : boolean;
/**
* Specifies text wrapping within a shape.
* False - No wrapping will occur on text body.
* True - Wrapping will occur on text body.
*/
wrapTextInShape : boolean;
}
/**
* It corresponds to "Format Shape - Text Options - Text Box - Vertical Alignment" in Excel.
*/
export enum ShapeTextVerticalAlignmentType {
/**
*/
Top = 0,
/**
*/
Middle = 1,
/**
*/
Bottom = 2,
/**
*/
TopCentered = 3,
/**
*/
MiddleCentered = 4,
/**
*/
BottomCentered = 5,
/**
*/
Left = 6,
/**
*/
Center = 7,
/**
*/
Right = 8,
/**
*/
LeftMiddle = 9,
/**
*/
CenterMiddle = 10,
/**
*/
RightMiddle = 11,
}
/**
* Represents the Timeline msodrawing object.
*/
export class TimelineShape extends Shape {
/**
* Constructs from a parent object convertible to this.
* @param obj - The parent object.
*/
constructor(obj: Shape);
}
/**
* Represents the type of connection
*/
export enum ExternalConnectionClassType {
/**
* ODBC or OLE DB
*/
Database = 0,
/**
* Web query
*/
WebQuery = 1,
/**
* Based on text
*/
TextBased = 2,
/**
* Data model
*/
DataModel = 3,
/**
*/
Unkown = 4,
}
/**
* Definition of custom function for calculating with user's custom engine.
*/
export class CustomFunctionDefinition {
/**
* Default Constructor.
*/
constructor();
/**
* Gets the indices of given custom function's parameters that need to be calculated in array mode.
* @param functionName - Name of the custom function.
* @returns
* Indices of the parameters that need to be calculated in array mode for given custom function.
* Default is null, there is no parameter which needs to be calculated in array mode for the custom function.
*
* @remarks
* For an expression that needs to be calculated, taking A: