Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

excel-builder-vanilla

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

excel-builder-vanilla - npm Package Compare versions

Comparing version 3.0.11 to 3.0.12

clone-dts.mjs

1788

dist/index.d.ts

@@ -0,55 +1,56 @@

// Generated by dts-bundle-generator v9.5.1
import { ZipOptions } from 'fflate';
type XMLNodeOption = {
attributes?: {
[key: string]: any;
};
children?: XMLNode[];
nodeName: string;
nodeValue?: string;
type?: string;
export type XMLNodeOption = {
attributes?: {
[key: string]: any;
};
children?: XMLNode[];
nodeName: string;
nodeValue?: string;
type?: string;
};
declare class XMLDOM {
documentElement: XMLNode;
constructor(ns: string | null, rootNodeName: string);
createElement(name: string): XMLNode;
createTextNode(text: string): TextNode;
toString(): string;
static Node: {
Create: (config: any) => XMLNode | TextNode | null;
};
export declare class XMLDOM {
documentElement: XMLNode;
constructor(ns: string | null, rootNodeName: string);
createElement(name: string): XMLNode;
createTextNode(text: string): TextNode;
toString(): string;
static Node: {
Create: (config: any) => XMLNode | TextNode | null;
};
}
declare class TextNode {
nodeValue: any;
constructor(text: string);
toJSON(): {
nodeValue: any;
type: string;
};
toString(): string;
nodeValue: any;
constructor(text: string);
toJSON(): {
nodeValue: any;
type: string;
};
toString(): string;
}
declare class XMLNode {
nodeName: string;
children: XMLNode[];
nodeValue: string;
attributes: {
[key: string]: any;
};
firstChild?: XMLNode;
constructor(config: XMLNodeOption);
toString(): string;
toJSON(): {
nodeName: string;
children: any[];
nodeValue: string;
attributes: {
[key: string]: any;
};
type: string;
};
setAttribute(name: string, val: any): void;
appendChild(child: any): void;
cloneNode(_deep?: boolean): XMLNode;
export declare class XMLNode {
nodeName: string;
children: XMLNode[];
nodeValue: string;
attributes: {
[key: string]: any;
};
firstChild?: XMLNode;
constructor(config: XMLNodeOption);
toString(): string;
toJSON(): {
nodeName: string;
children: any[];
nodeValue: string;
attributes: {
[key: string]: any;
};
type: string;
};
setAttribute(name: string, val: any): void;
appendChild(child: any): void;
cloneNode(_deep?: boolean): XMLNode;
}
/**

@@ -64,30 +65,28 @@ *

*/
declare class AbsoluteAnchor {
x: number | null;
y: number | null;
width: number | null;
height: number | null;
constructor(config: any);
/**
* Sets the X and Y offsets.
*
* @param {Number} x
* @param {Number} y
* @returns {undefined}
*/
setPos(x: number, y: number): void;
/**
* Sets the width and height of the image.
*
* @param {Number} width
* @param {Number} height
* @returns {undefined}
*/
setDimensions(width: number, height: number): void;
toXML(xmlDoc: XMLDOM, content: any): XMLNode;
export declare class AbsoluteAnchor {
x: number | null;
y: number | null;
width: number | null;
height: number | null;
constructor(config: any);
/**
* Sets the X and Y offsets.
*
* @param {Number} x
* @param {Number} y
* @returns {undefined}
*/
setPos(x: number, y: number): void;
/**
* Sets the width and height of the image.
*
* @param {Number} width
* @param {Number} height
* @returns {undefined}
*/
setDimensions(width: number, height: number): void;
toXML(xmlDoc: XMLDOM, content: any): XMLNode;
}
declare class Chart {
export declare class Chart {
}
/**

@@ -102,24 +101,22 @@ *

*/
declare class OneCellAnchor {
x: number | null;
y: number | null;
xOff: boolean | null;
yOff: boolean | null;
width: number | null;
height: number | null;
constructor(config: any);
setPos(x: number, y: number, xOff?: boolean, yOff?: boolean): void;
setDimensions(width: number, height: number): void;
toXML(xmlDoc: XMLDOM, content: any): XMLNode;
export declare class OneCellAnchor {
x: number | null;
y: number | null;
xOff: boolean | null;
yOff: boolean | null;
width: number | null;
height: number | null;
constructor(config: any);
setPos(x: number, y: number, xOff?: boolean, yOff?: boolean): void;
setDimensions(width: number, height: number): void;
toXML(xmlDoc: XMLDOM, content: any): XMLNode;
}
declare class TwoCellAnchor {
from: any;
to: any;
constructor(config: any);
setFrom(x: number, y: number, xOff?: boolean, yOff?: boolean): void;
setTo(x: number, y: number, xOff?: boolean, yOff?: boolean): void;
toXML(xmlDoc: XMLDOM, content: any): XMLNode;
export declare class TwoCellAnchor {
from: any;
to: any;
constructor(config: any);
setFrom(x: number, y: number, xOff?: boolean, yOff?: boolean): void;
setTo(x: number, y: number, xOff?: boolean, yOff?: boolean): void;
toXML(xmlDoc: XMLDOM, content: any): XMLNode;
}
/**

@@ -130,182 +127,176 @@ * This is mostly a global spot where all of the relationship managers can get and set

*/
declare class Drawing {
anchor: any;
id: string;
get AbsoluteAnchor(): typeof AbsoluteAnchor;
get Chart(): typeof Chart;
get OneCellAnchor(): typeof OneCellAnchor;
get TwoCellAnchor(): typeof TwoCellAnchor;
/**
*
* @param {String} type Can be 'absoluteAnchor', 'oneCellAnchor', or 'twoCellAnchor'.
* @param {Object} config Shorthand - pass the created anchor coords that can normally be used to construct it.
* @returns {Anchor}
*/
createAnchor(type: string, config: any): any;
export declare class Drawing {
anchor: any;
id: string;
get AbsoluteAnchor(): typeof AbsoluteAnchor;
get Chart(): typeof Chart;
get OneCellAnchor(): typeof OneCellAnchor;
get TwoCellAnchor(): typeof TwoCellAnchor;
/**
*
* @param {String} type Can be 'absoluteAnchor', 'oneCellAnchor', or 'twoCellAnchor'.
* @param {Object} config Shorthand - pass the created anchor coords that can normally be used to construct it.
* @returns {Anchor}
*/
createAnchor(type: string, config: any): any;
}
/**
* @module Excel/Util
*/
declare class Util {
static _idSpaces: {
[space: string]: number;
};
/**
* Returns a number based on a namespace. So, running with 'Picture' will return 1. Run again, you will get 2. Run with 'Foo', you'll get 1.
* @param {String} space
* @returns {Number}
*/
static uniqueId(space: string): number;
/**
* Attempts to create an XML document. After some investigation, using the 'fake' document
* is significantly faster than creating an actual XML document, so we're going to go with
* that. Besides, it just makes it easier to port to node.
*
* Takes a namespace to start the xml file in, as well as the root element
* of the xml file.
*
* @param {type} ns
* @param {type} base
* @returns {@new;XMLDOM}
*/
static createXmlDoc(ns: string, base: string): XMLDOM;
/**
* Creates an xml node (element). Used to simplify some calls, as IE is
* very particular about namespaces and such.
*
* @param {XMLDOM} doc An xml document (actual DOM or fake DOM, not a string)
* @param {type} name The name of the element
* @param {type} attributes
* @returns {XML Node}
*/
static createElement(doc: XMLDOM, name: string, attributes?: any): XMLNode;
/**
* This is sort of slow, but it's a huge convenience method for the code. It probably shouldn't be used
* in high repetition areas.
*
* @param {XMLDoc} doc
* @param {Object} attrs
*/
static setAttributesOnDoc(doc: XMLNode, attrs: {
[key: string]: any;
}): void;
static LETTER_REFS: any;
static positionToLetterRef(x: number, y: number | string): any;
static schemas: {
worksheet: string;
sharedStrings: string;
stylesheet: string;
relationships: string;
relationshipPackage: string;
contentTypes: string;
spreadsheetml: string;
markupCompat: string;
x14ac: string;
officeDocument: string;
package: string;
table: string;
spreadsheetDrawing: string;
drawing: string;
drawingRelationship: string;
image: string;
chart: string;
hyperlink: string;
};
export declare class Util {
static _idSpaces: {
[space: string]: number;
};
/**
* Returns a number based on a namespace. So, running with 'Picture' will return 1. Run again, you will get 2. Run with 'Foo', you'll get 1.
* @param {String} space
* @returns {Number}
*/
static uniqueId(space: string): number;
/**
* Attempts to create an XML document. After some investigation, using the 'fake' document
* is significantly faster than creating an actual XML document, so we're going to go with
* that. Besides, it just makes it easier to port to node.
*
* Takes a namespace to start the xml file in, as well as the root element
* of the xml file.
*
* @param {type} ns
* @param {type} base
* @returns {@new;XMLDOM}
*/
static createXmlDoc(ns: string, base: string): XMLDOM;
/**
* Creates an xml node (element). Used to simplify some calls, as IE is
* very particular about namespaces and such.
*
* @param {XMLDOM} doc An xml document (actual DOM or fake DOM, not a string)
* @param {type} name The name of the element
* @param {type} attributes
* @returns {XML Node}
*/
static createElement(doc: XMLDOM, name: string, attributes?: any): XMLNode;
/**
* This is sort of slow, but it's a huge convenience method for the code. It probably shouldn't be used
* in high repetition areas.
*
* @param {XMLDoc} doc
* @param {Object} attrs
*/
static setAttributesOnDoc(doc: XMLNode, attrs: {
[key: string]: any;
}): void;
static LETTER_REFS: any;
static positionToLetterRef(x: number, y: number | string): any;
static schemas: {
worksheet: string;
sharedStrings: string;
stylesheet: string;
relationships: string;
relationshipPackage: string;
contentTypes: string;
spreadsheetml: string;
markupCompat: string;
x14ac: string;
officeDocument: string;
package: string;
table: string;
spreadsheetDrawing: string;
drawing: string;
drawingRelationship: string;
image: string;
chart: string;
hyperlink: string;
};
}
declare class Picture extends Drawing {
media: any;
id: string;
pictureId: number;
fill: any;
mediaData: any;
description: string;
constructor();
setMedia(mediaRef: any): void;
setDescription(description: string): void;
setFillType(type: string): void;
setFillConfig(config: any): void;
getMediaType(): keyof typeof Util.schemas;
getMediaData(): any;
setRelationshipId(rId: string): void;
toXML(xmlDoc: XMLDOM): any;
export declare class Picture extends Drawing {
media: any;
id: string;
pictureId: number;
fill: any;
mediaData: any;
description: string;
constructor();
setMedia(mediaRef: any): void;
setDescription(description: string): void;
setFillType(type: string): void;
setFillConfig(config: any): void;
getMediaType(): keyof typeof Util.schemas;
getMediaData(): any;
setRelationshipId(rId: string): void;
toXML(xmlDoc: XMLDOM): any;
}
/**
* @module Excel/RelationshipManager
*/
declare class RelationshipManager {
relations: {
[id: string]: {
id: string;
schema: string;
object: any;
data?: {
id: number;
schema: string;
object: any;
};
};
};
lastId: number;
constructor();
importData(data: any): void;
exportData(): {
relations: {
[id: string]: {
id: string;
schema: string;
object: any;
data?: {
id: number;
schema: string;
object: any;
};
};
};
lastId: number;
};
addRelation(object: {
id: string;
}, type: keyof typeof Util.schemas): string;
getRelationshipId(object: {
id: string;
}): string | null;
toXML(): XMLDOM;
export declare class RelationshipManager {
relations: {
[id: string]: {
id: string;
schema: string;
object: any;
data?: {
id: number;
schema: string;
object: any;
};
};
};
lastId: number;
constructor();
importData(data: any): void;
exportData(): {
relations: {
[id: string]: {
id: string;
schema: string;
object: any;
data?: {
id: number;
schema: string;
object: any;
};
};
};
lastId: number;
};
addRelation(object: {
id: string;
}, type: keyof typeof Util.schemas): string;
getRelationshipId(object: {
id: string;
}): string | null;
toXML(): XMLDOM;
}
/**
* @module Excel/Drawings
*/
declare class Drawings {
drawings: (Drawing | Picture)[];
relations: RelationshipManager;
id: string;
/**
* Adds a drawing (more likely a subclass of a Drawing) to the 'Drawings' for a particular worksheet.
*
* @param {Drawing} drawing
* @returns {undefined}
*/
addDrawing(drawing: Drawing): void;
getCount(): number;
toXML(): XMLDOM;
export declare class Drawings {
drawings: (Drawing | Picture)[];
relations: RelationshipManager;
id: string;
/**
* Adds a drawing (more likely a subclass of a Drawing) to the 'Drawings' for a particular worksheet.
*
* @param {Drawing} drawing
* @returns {undefined}
*/
addDrawing(drawing: Drawing): void;
getCount(): number;
toXML(): XMLDOM;
}
declare class Pane {
state: null | 'split' | 'frozen' | 'frozenSplit';
xSplit: number | null;
ySplit: number | null;
activePane: string;
topLeftCell: number | string | null;
_freezePane: {
xSplit: number;
ySplit: number;
cell: string;
};
freezePane(column: number, row: number, cell: string): void;
exportXML(doc: XMLDOM): XMLNode;
export declare class Pane {
state: null | "split" | "frozen" | "frozenSplit";
xSplit: number | null;
ySplit: number | null;
activePane: string;
topLeftCell: number | string | null;
_freezePane: {
xSplit: number;
ySplit: number;
cell: string;
};
freezePane(column: number, row: number, cell: string): void;
exportXML(doc: XMLDOM): XMLNode;
}
/**

@@ -316,6 +307,5 @@ * This is mostly a global spot where all of the relationship managers can get and set

*/
declare const Paths: {
[path: string]: string;
export declare const Paths: {
[path: string]: string;
};
/**

@@ -330,31 +320,29 @@ * Converts pixel sizes to 'EMU's, which is what Open XML uses.

*/
declare class Positioning {
static pixelsToEMUs(pixels: number): number;
export declare class Positioning {
static pixelsToEMUs(pixels: number): number;
}
/**
* @module Excel/SharedStrings
*/
declare class SharedStrings {
strings: {
[key: string]: number;
};
stringArray: string[];
id: string;
/**
* Adds a string to the shared string file, and returns the ID of the
* string which can be used to reference it in worksheets.
*
* @param str {String}
* @return int
*/
addString(str: string): number;
exportData(): {
[key: string]: number;
};
toXML(): XMLDOM;
export declare class SharedStrings {
strings: {
[key: string]: number;
};
stringArray: string[];
id: string;
/**
* Adds a string to the shared string file, and returns the ID of the
* string which can be used to reference it in worksheets.
*
* @param str {String}
* @return int
*/
addString(str: string): number;
exportData(): {
[key: string]: number;
};
toXML(): XMLDOM;
}
interface SheetViewOption {
pane?: Pane;
export interface SheetViewOption {
pane?: Pane;
}

@@ -366,34 +354,33 @@ /**

*/
declare class SheetView {
pane: Pane;
showZeros: null;
defaultGridColor: null;
colorId: null;
rightToLeft: null;
showFormulas: null;
showGridLines: null;
showOutlineSymbols: null;
showRowColHeaders: null;
showRuler: null;
showWhiteSpace: null;
tabSelected: null;
topLeftCell: null;
viewType: null;
windowProtection: null;
zoomScale: null;
zoomScaleNormal: null;
zoomScalePageLayoutView: null;
zoomScaleSheetLayoutView: null;
constructor(config?: SheetViewOption);
/**
* Added froze pane
* @param column - column number: 0, 1, 2 ...
* @param row - row number: 0, 1, 2 ...
* @param cell - 'A1'
* @deprecated
*/
freezePane(column: number, row: number, cell: string): void;
exportXML(doc: XMLDOM): XMLNode;
export declare class SheetView {
pane: Pane;
showZeros: null;
defaultGridColor: null;
colorId: null;
rightToLeft: null;
showFormulas: null;
showGridLines: null;
showOutlineSymbols: null;
showRowColHeaders: null;
showRuler: null;
showWhiteSpace: null;
tabSelected: null;
topLeftCell: null;
viewType: null;
windowProtection: null;
zoomScale: null;
zoomScaleNormal: null;
zoomScalePageLayoutView: null;
zoomScaleSheetLayoutView: null;
constructor(config?: SheetViewOption);
/**
* Added froze pane
* @param column - column number: 0, 1, 2 ...
* @param row - row number: 0, 1, 2 ...
* @param cell - 'A1'
* @deprecated
*/
freezePane(column: number, row: number, cell: string): void;
exportXML(doc: XMLDOM): XMLNode;
}
/**

@@ -404,320 +391,317 @@ * Excel Color in ARGB format, for color aren't transparent just use "FF" as prefix.

*/
type ExcelColorStyle = string | {
theme: number;
export type ExcelColorStyle = string | {
theme: number;
};
interface ExcelAlignmentStyle {
horizontal?: 'center' | 'fill' | 'general' | 'justify' | 'left' | 'right';
justifyLastLine?: boolean;
readingOrder?: string;
relativeIndent?: boolean;
shrinkToFit?: boolean;
textRotation?: string | number;
vertical?: 'bottom' | 'distributed' | 'center' | 'justify' | 'top';
wrapText?: boolean;
export interface ExcelAlignmentStyle {
horizontal?: "center" | "fill" | "general" | "justify" | "left" | "right";
justifyLastLine?: boolean;
readingOrder?: string;
relativeIndent?: boolean;
shrinkToFit?: boolean;
textRotation?: string | number;
vertical?: "bottom" | "distributed" | "center" | "justify" | "top";
wrapText?: boolean;
}
type ExcelBorderLineStyle = 'continuous' | 'dash' | 'dashDot' | 'dashDotDot' | 'dotted' | 'double' | 'lineStyleNone' | 'medium' | 'slantDashDot' | 'thin' | 'thick';
interface ExcelBorderStyle {
bottom?: {
color?: ExcelColorStyle;
style?: ExcelBorderLineStyle;
};
top?: {
color?: ExcelColorStyle;
style?: ExcelBorderLineStyle;
};
left?: {
color?: ExcelColorStyle;
style?: ExcelBorderLineStyle;
};
right?: {
color?: ExcelColorStyle;
style?: ExcelBorderLineStyle;
};
diagonal?: any;
outline?: boolean;
diagonalUp?: boolean;
diagonalDown?: boolean;
export type ExcelBorderLineStyle = "continuous" | "dash" | "dashDot" | "dashDotDot" | "dotted" | "double" | "lineStyleNone" | "medium" | "slantDashDot" | "thin" | "thick";
export interface ExcelBorderStyle {
bottom?: {
color?: ExcelColorStyle;
style?: ExcelBorderLineStyle;
};
top?: {
color?: ExcelColorStyle;
style?: ExcelBorderLineStyle;
};
left?: {
color?: ExcelColorStyle;
style?: ExcelBorderLineStyle;
};
right?: {
color?: ExcelColorStyle;
style?: ExcelBorderLineStyle;
};
diagonal?: any;
outline?: boolean;
diagonalUp?: boolean;
diagonalDown?: boolean;
}
interface ExcelColumn {
bestFit?: boolean;
customWidth?: number;
hidden?: boolean;
min?: number;
max?: number;
width?: number;
export interface ExcelColumn {
bestFit?: boolean;
customWidth?: number;
hidden?: boolean;
min?: number;
max?: number;
width?: number;
}
type ExcelColumnFormat = 'bestFit' | 'collapsed' | 'customWidth' | 'hidden' | 'max' | 'min' | 'outlineLevel' | 'phonetic' | 'style' | 'width';
interface ExcelTableColumn {
name: string;
dataCellStyle?: any;
dataDxfId?: number;
headerRowCellStyle?: ExcelStyleInstruction;
headerRowDxfId?: number;
totalsRowCellStyle?: ExcelStyleInstruction;
totalsRowDxfId?: number;
totalsRowFunction?: any;
totalsRowLabel?: string;
columnFormula?: string;
columnFormulaIsArrayType?: boolean;
totalFormula?: string;
totalFormulaIsArrayType?: boolean;
export type ExcelColumnFormat = "bestFit" | "collapsed" | "customWidth" | "hidden" | "max" | "min" | "outlineLevel" | "phonetic" | "style" | "width";
export interface ExcelTableColumn {
name: string;
dataCellStyle?: any;
dataDxfId?: number;
headerRowCellStyle?: ExcelStyleInstruction;
headerRowDxfId?: number;
totalsRowCellStyle?: ExcelStyleInstruction;
totalsRowDxfId?: number;
totalsRowFunction?: any;
totalsRowLabel?: string;
columnFormula?: string;
columnFormulaIsArrayType?: boolean;
totalFormula?: string;
totalFormulaIsArrayType?: boolean;
}
interface ExcelFillStyle {
type?: 'gradient' | 'pattern';
patternType?: string;
degree?: number;
fgColor?: ExcelColorStyle;
start?: ExcelColorStyle;
end?: {
pureAt?: number;
color?: ExcelColorStyle;
};
export interface ExcelFillStyle {
type?: "gradient" | "pattern";
patternType?: string;
degree?: number;
fgColor?: ExcelColorStyle;
start?: ExcelColorStyle;
end?: {
pureAt?: number;
color?: ExcelColorStyle;
};
}
interface ExcelFontStyle {
bold?: boolean;
color?: ExcelColorStyle;
fontName?: string;
italic?: boolean;
outline?: boolean;
size?: number;
shadow?: boolean;
strike?: boolean;
subscript?: boolean;
superscript?: boolean;
underline?: boolean | 'single' | 'double' | 'singleAccounting' | 'doubleAccounting';
export interface ExcelFontStyle {
bold?: boolean;
color?: ExcelColorStyle;
fontName?: string;
italic?: boolean;
outline?: boolean;
size?: number;
shadow?: boolean;
strike?: boolean;
subscript?: boolean;
superscript?: boolean;
underline?: boolean | "single" | "double" | "singleAccounting" | "doubleAccounting";
}
interface ExcelMetadata {
type?: string;
style?: number;
export interface ExcelMetadata {
type?: string;
style?: number;
}
interface ExcelColumnMetadata {
value: any;
metadata?: ExcelMetadata;
export interface ExcelColumnMetadata {
value: any;
metadata?: ExcelMetadata;
}
interface ExcelMargin {
top: number;
bottom: number;
left: number;
right: number;
header: number;
footer: number;
export interface ExcelMargin {
top: number;
bottom: number;
left: number;
right: number;
header: number;
footer: number;
}
interface ExcelSortState {
caseSensitive?: boolean;
dataRange?: any;
columnSort?: boolean;
sortDirection?: 'ascending' | 'descending';
sortRange?: any;
export interface ExcelSortState {
caseSensitive?: boolean;
dataRange?: any;
columnSort?: boolean;
sortDirection?: "ascending" | "descending";
sortRange?: any;
}
/** Excel custom formatting that will be applied to a column */
interface ExcelStyleInstruction {
id?: number;
alignment?: ExcelAlignmentStyle;
border?: ExcelBorderStyle;
borderId?: number;
fill?: ExcelFillStyle;
fillId?: number;
font?: ExcelFontStyle;
fontId?: number;
format?: string;
height?: number;
numFmt?: string;
numFmtId?: number;
width?: number;
xfId?: number;
protection?: {
locked?: boolean;
hidden?: boolean;
};
/** style id */
style?: number;
export interface ExcelStyleInstruction {
id?: number;
alignment?: ExcelAlignmentStyle;
border?: ExcelBorderStyle;
borderId?: number;
fill?: ExcelFillStyle;
fillId?: number;
font?: ExcelFontStyle;
fontId?: number;
format?: string;
height?: number;
numFmt?: string;
numFmtId?: number;
width?: number;
xfId?: number;
protection?: {
locked?: boolean;
hidden?: boolean;
};
/** style id */
style?: number;
}
/**
* @module Excel/StyleSheet
*/
declare class StyleSheet {
id: string;
cellStyles: {
name: string;
xfId: string;
builtinId: string;
}[];
defaultTableStyle: boolean;
differentialStyles: any[];
masterCellFormats: any[];
masterCellStyles: any[];
fonts: ExcelFontStyle[];
numberFormatters: any[];
fills: any[];
borders: any[];
tableStyles: any[];
createSimpleFormatter(type: string): {
[id: string]: number;
};
createFill(fillInstructions: any): any;
createNumberFormatter(formatInstructions: any): {
id: number;
formatCode: any;
};
/**
* alignment: {
* horizontal: http://www.schemacentral.com/sc/ooxml/t-ssml_ST_HorizontalAlignment.html
* vertical: http://www.schemacentral.com/sc/ooxml/t-ssml_ST_VerticalAlignment.html
* @param {Object} styleInstructions
*/
createFormat(styleInstructions: ExcelStyleInstruction): any;
createDifferentialStyle(styleInstructions: ExcelStyleInstruction): ExcelStyleInstruction;
/**
* Should be an object containing keys that match with one of the keys from this list:
* http://www.schemacentral.com/sc/ooxml/t-ssml_ST_TableStyleType.html
*
* The value should be a reference to a differential format (dxf)
* @param {Object} instructions
*/
createTableStyle(instructions: any): void;
/**
* All params optional
* Expects: {
* top: {},
* left: {},
* right: {},
* bottom: {},
* diagonal: {},
* outline: boolean,
* diagonalUp: boolean,
* diagonalDown: boolean
* }
* Each border should follow:
* {
* style: styleString, http://www.schemacentral.com/sc/ooxml/t-ssml_ST_BorderStyle.html
* color: ARBG color (requires the A, so for example FF006666)
* }
* @param {Object} border
*/
createBorderFormatter(border: any): any;
/**
* Supported font styles:
* bold
* italic
* underline (single, double, singleAccounting, doubleAccounting)
* size
* color
* fontName
* strike (strikethrough)
* outline (does this actually do anything?)
* shadow (does this actually do anything?)
* superscript
* subscript
*
* Color is a future goal - at the moment it's looking a bit complicated
* @param {Object} instructions
*/
createFontStyle(instructions: ExcelFontStyle): any;
exportBorders(doc: XMLDOM): XMLNode;
exportBorder(doc: XMLDOM, data: any): XMLNode;
exportColor(doc: XMLDOM, color: any): XMLNode;
exportMasterCellFormats(doc: XMLDOM): XMLNode;
exportMasterCellStyles(doc: XMLDOM): XMLNode;
exportCellFormatElement(doc: XMLDOM, styleInstructions: ExcelStyleInstruction): XMLNode;
exportAlignment(doc: XMLDOM, alignmentData: any): XMLNode;
exportFonts(doc: XMLDOM): XMLNode;
exportFont(doc: XMLDOM, fd: any): XMLNode;
exportFills(doc: XMLDOM): XMLNode;
exportFill(doc: XMLDOM, fd: any): XMLNode;
exportGradientFill(doc: XMLDOM, data: any): XMLNode;
/**
* Pattern types: http://www.schemacentral.com/sc/ooxml/t-ssml_ST_PatternType.html
* @param {XMLDoc} doc
* @param {Object} data
*/
exportPatternFill(doc: XMLDOM, data: any): XMLNode;
exportNumberFormatters(doc: XMLDOM): XMLNode;
exportNumberFormatter(doc: XMLDOM, fd: any): XMLNode;
exportCellStyles(doc: XMLDOM): XMLNode;
exportDifferentialStyles(doc: XMLDOM): XMLNode;
exportDFX(doc: XMLDOM, style: any): XMLNode;
exportTableStyles(doc: XMLDOM): XMLNode;
exportTableStyle(doc: XMLDOM, style: {
name: string;
wholeTable?: number;
headerRow?: number;
}): XMLNode;
exportProtection(doc: XMLDOM, protectionData: any): XMLNode;
toXML(): XMLDOM;
declare class StyleSheet$1 {
id: string;
cellStyles: {
name: string;
xfId: string;
builtinId: string;
}[];
defaultTableStyle: boolean;
differentialStyles: any[];
masterCellFormats: any[];
masterCellStyles: any[];
fonts: ExcelFontStyle[];
numberFormatters: any[];
fills: any[];
borders: any[];
tableStyles: any[];
createSimpleFormatter(type: string): {
[id: string]: number;
};
createFill(fillInstructions: any): any;
createNumberFormatter(formatInstructions: any): {
id: number;
formatCode: any;
};
/**
* alignment: {
* horizontal: http://www.schemacentral.com/sc/ooxml/t-ssml_ST_HorizontalAlignment.html
* vertical: http://www.schemacentral.com/sc/ooxml/t-ssml_ST_VerticalAlignment.html
* @param {Object} styleInstructions
*/
createFormat(styleInstructions: ExcelStyleInstruction): any;
createDifferentialStyle(styleInstructions: ExcelStyleInstruction): ExcelStyleInstruction;
/**
* Should be an object containing keys that match with one of the keys from this list:
* http://www.schemacentral.com/sc/ooxml/t-ssml_ST_TableStyleType.html
*
* The value should be a reference to a differential format (dxf)
* @param {Object} instructions
*/
createTableStyle(instructions: any): void;
/**
* All params optional
* Expects: {
* top: {},
* left: {},
* right: {},
* bottom: {},
* diagonal: {},
* outline: boolean,
* diagonalUp: boolean,
* diagonalDown: boolean
* }
* Each border should follow:
* {
* style: styleString, http://www.schemacentral.com/sc/ooxml/t-ssml_ST_BorderStyle.html
* color: ARBG color (requires the A, so for example FF006666)
* }
* @param {Object} border
*/
createBorderFormatter(border: any): any;
/**
* Supported font styles:
* bold
* italic
* underline (single, double, singleAccounting, doubleAccounting)
* size
* color
* fontName
* strike (strikethrough)
* outline (does this actually do anything?)
* shadow (does this actually do anything?)
* superscript
* subscript
*
* Color is a future goal - at the moment it's looking a bit complicated
* @param {Object} instructions
*/
createFontStyle(instructions: ExcelFontStyle): any;
exportBorders(doc: XMLDOM): XMLNode;
exportBorder(doc: XMLDOM, data: any): XMLNode;
exportColor(doc: XMLDOM, color: any): XMLNode;
exportMasterCellFormats(doc: XMLDOM): XMLNode;
exportMasterCellStyles(doc: XMLDOM): XMLNode;
exportCellFormatElement(doc: XMLDOM, styleInstructions: ExcelStyleInstruction): XMLNode;
exportAlignment(doc: XMLDOM, alignmentData: any): XMLNode;
exportFonts(doc: XMLDOM): XMLNode;
exportFont(doc: XMLDOM, fd: any): XMLNode;
exportFills(doc: XMLDOM): XMLNode;
exportFill(doc: XMLDOM, fd: any): XMLNode;
exportGradientFill(doc: XMLDOM, data: any): XMLNode;
/**
* Pattern types: http://www.schemacentral.com/sc/ooxml/t-ssml_ST_PatternType.html
* @param {XMLDoc} doc
* @param {Object} data
*/
exportPatternFill(doc: XMLDOM, data: any): XMLNode;
exportNumberFormatters(doc: XMLDOM): XMLNode;
exportNumberFormatter(doc: XMLDOM, fd: any): XMLNode;
exportCellStyles(doc: XMLDOM): XMLNode;
exportDifferentialStyles(doc: XMLDOM): XMLNode;
exportDFX(doc: XMLDOM, style: any): XMLNode;
exportTableStyles(doc: XMLDOM): XMLNode;
exportTableStyle(doc: XMLDOM, style: {
name: string;
wholeTable?: number;
headerRow?: number;
}): XMLNode;
exportProtection(doc: XMLDOM, protectionData: any): XMLNode;
toXML(): XMLDOM;
}
/**
* @module Excel/Table
*/
declare class Table {
name: string;
id: string;
tableId: string;
displayName: string;
dataCellStyle: any;
dataDfxId: number | null;
headerRowBorderDxfId: number | null;
headerRowCellStyle: any;
headerRowCount: number;
headerRowDxfId: number | null;
insertRow: boolean;
insertRowShift: boolean;
ref: any;
tableBorderDxfId: number | null;
totalsRowBorderDxfId: number | null;
totalsRowCellStyle: any;
totalsRowCount: number;
totalsRowDxfId: number | null;
tableColumns: any;
autoFilter: any;
sortState: any;
styleInfo: any;
constructor(config?: any);
initialize(config: any): void;
setReferenceRange(start: number[], end: number[]): void;
setTableColumns(columns: Array<ExcelTableColumn | string>): void;
/**
* Expects an object with the following optional properties:
* name (required)
* dataCellStyle
* dataDxfId
* headerRowCellStyle
* headerRowDxfId
* totalsRowCellStyle
* totalsRowDxfId
* totalsRowFunction
* totalsRowLabel
* columnFormula
* columnFormulaIsArrayType (boolean)
* totalFormula
* totalFormulaIsArrayType (boolean)
*/
addTableColumn(column: ExcelTableColumn | string): void;
/**
* Expects an object with the following properties:
* caseSensitive (boolean)
* dataRange
* columnSort (assumes true)
* sortDirection
* sortRange (defaults to dataRange)
*/
setSortState(state: ExcelSortState): void;
toXML(): XMLDOM;
exportTableColumns(doc: XMLDOM): XMLNode;
exportAutoFilter(doc: XMLDOM): XMLNode;
exportTableStyleInfo(doc: XMLDOM): XMLNode;
addAutoFilter(startRef: any, endRef: any): void;
export declare class Table {
name: string;
id: string;
tableId: string;
displayName: string;
dataCellStyle: any;
dataDfxId: number | null;
headerRowBorderDxfId: number | null;
headerRowCellStyle: any;
headerRowCount: number;
headerRowDxfId: number | null;
insertRow: boolean;
insertRowShift: boolean;
ref: any;
tableBorderDxfId: number | null;
totalsRowBorderDxfId: number | null;
totalsRowCellStyle: any;
totalsRowCount: number;
totalsRowDxfId: number | null;
tableColumns: any;
autoFilter: any;
sortState: any;
styleInfo: any;
constructor(config?: any);
initialize(config: any): void;
setReferenceRange(start: number[], end: number[]): void;
setTableColumns(columns: Array<ExcelTableColumn | string>): void;
/**
* Expects an object with the following optional properties:
* name (required)
* dataCellStyle
* dataDxfId
* headerRowCellStyle
* headerRowDxfId
* totalsRowCellStyle
* totalsRowDxfId
* totalsRowFunction
* totalsRowLabel
* columnFormula
* columnFormulaIsArrayType (boolean)
* totalFormula
* totalFormulaIsArrayType (boolean)
*/
addTableColumn(column: ExcelTableColumn | string): void;
/**
* Expects an object with the following properties:
* caseSensitive (boolean)
* dataRange
* columnSort (assumes true)
* sortDirection
* sortRange (defaults to dataRange)
*/
setSortState(state: ExcelSortState): void;
toXML(): XMLDOM;
exportTableColumns(doc: XMLDOM): XMLNode;
exportAutoFilter(doc: XMLDOM): XMLNode;
exportTableStyleInfo(doc: XMLDOM): XMLNode;
addAutoFilter(startRef: any, endRef: any): void;
}
interface CharType {
font?: string;
bold?: boolean;
fontSize?: number;
text?: string;
underline?: boolean;
export interface CharType {
font?: string;
bold?: boolean;
fontSize?: number;
text?: string;
underline?: boolean;
}
interface WorksheetOption {
name?: string;
sheetView?: SheetView;
export interface WorksheetOption {
name?: string;
sheetView?: SheetView;
}

@@ -730,270 +714,292 @@ /**

*/
declare class Worksheet {
name: string;
id: string;
_timezoneOffset: number;
relations: any;
columnFormats: ExcelColumnFormat[];
data: (number | string | boolean | Date | null | ExcelColumnMetadata)[][];
mergedCells: string[][];
columns: ExcelColumn[];
sheetProtection: any;
_headers: [left?: any, center?: any, right?: any];
_footers: [left?: any, center?: any, right?: any];
_tables: Table[];
_drawings: Array<Table | Drawings>;
_orientation?: string;
_margin?: ExcelMargin;
_rowInstructions: any;
_freezePane: {
xSplit?: number;
ySplit?: number;
cell?: string;
};
sharedStrings: SharedStrings | null;
hyperlinks: never[];
sheetView: SheetView;
showZeros: any;
constructor(config: WorksheetOption);
initialize(config: any): void;
/**
* Returns an object that can be consumed by a Worksheet/Export/Worker
* @returns {Object}
*/
exportData(): {
relations: any;
columnFormats: ExcelColumnFormat[];
data: (string | number | boolean | ExcelColumnMetadata | Date | null)[][];
columns: ExcelColumn[];
mergedCells: string[][];
_headers: [left?: any, center?: any, right?: any];
_footers: [left?: any, center?: any, right?: any];
_tables: Table[];
_rowInstructions: any;
_freezePane: {
xSplit?: number;
ySplit?: number;
cell?: string;
};
name: string;
id: string;
};
/**
* Imports data - to be used while inside of a WorksheetExportWorker.
* @param {Object} data
*/
importData(data: any): void;
setSharedStringCollection(stringCollection: SharedStrings): void;
addTable(table: Table): void;
addDrawings(drawings: Drawings): void;
setRowInstructions(rowIndex: number, instructions: ExcelStyleInstruction): void;
/**
* Expects an array length of three.
*
* @see Excel/Worksheet compilePageDetailPiece
* @see <a href='/cookbook/addingHeadersAndFooters.html'>Adding headers and footers to a worksheet</a>
*
* @param {Array} headers [left, center, right]
*/
setHeader(headers: [left: any, center: any, right: any]): void;
/**
* Expects an array length of three.
*
* @see Excel/Worksheet compilePageDetailPiece
* @see <a href='/cookbook/addingHeadersAndFooters.html'>Adding headers and footers to a worksheet</a>
*
* @param {Array} footers [left, center, right]
*/
setFooter(footers: [left: any, center: any, right: any]): void;
/**
* Turns page header/footer details into the proper format for Excel.
* @param {type} data
* @returns {String}
*/
compilePageDetailPackage(data: any): string;
/**
* Turns instructions on page header/footer details into something
* usable by Excel.
*
* @param {type} data
* @returns {String|@exp;_@call;reduce}
*/
compilePageDetailPiece(data: string | CharType | any[]): any;
/**
* Creates the header node.
*
* @todo implement the ability to do even/odd headers
* @param {XML Doc} doc
* @returns {XML Node}
*/
exportHeader(doc: XMLDOM): XMLNode;
/**
* Creates the footer node.
*
* @todo implement the ability to do even/odd footers
* @param {XML Doc} doc
* @returns {XML Node}
*/
exportFooter(doc: XMLDOM): XMLNode;
/**
* This creates some nodes ahead of time, which cuts down on generation time due to
* most cell definitions being essentially the same, but having multiple nodes that need
* to be created. Cloning takes less time than creation.
*
* @private
* @param {XML Doc} doc
* @returns {_L8.Anonym$0._buildCache.Anonym$2}
*/
_buildCache(doc: XMLDOM): {
number: XMLNode;
date: XMLNode;
string: XMLNode;
formula: XMLNode;
};
/**
* Runs through the XML document and grabs all of the strings that will
* be sent to the 'shared strings' document.
*
* @returns {Array}
*/
collectSharedStrings(): string[];
toXML(): XMLDOM;
/**
*
* @param {XML Doc} doc
* @returns {XML Node}
*/
exportColumns(doc: XMLDOM): XMLNode;
/**
* Sets the page settings on a worksheet node.
*
* @param {XML Doc} doc
* @param {XML Node} worksheet
* @returns {undefined}
*/
exportPageSettings(doc: XMLDOM, worksheet: XMLNode): void;
/**
* http://www.schemacentral.com/sc/ooxml/t-ssml_ST_Orientation.html
*
* Can be one of 'portrait' or 'landscape'.
*
* @param {'default' | 'portrait' | 'landscape'} orientation
* @returns {undefined}
*/
setPageOrientation(orientation: 'default' | 'portrait' | 'landscape'): void;
/**
* Set page details in inches.
* use this structure:
* {
* top: 0.7
* , bottom: 0.7
* , left: 0.7
* , right: 0.7
* , header: 0.3
* , footer: 0.3
* }
*
* @returns {undefined}
*/
setPageMargin(input: ExcelMargin): void;
/**
* Expects an array of column definitions. Each column definition needs to have a width assigned to it.
*
* @param {Array} columns
*/
setColumns(columns: ExcelColumn[]): void;
/**
* Expects an array of data to be translated into cells.
*
* @param {Array} data Two dimensional array - [ [A1, A2], [B1, B2] ]
* @see <a href='/cookbook/addingDataToAWorksheet.html'>Adding data to a worksheet</a>
*/
setData(data: (number | string | boolean | Date | null | ExcelColumnMetadata)[][]): void;
/**
* Merge cells in given range
*
* @param cell1 - A1, A2...
* @param cell2 - A2, A3...
*/
mergeCells(cell1: string, cell2: string): void;
/**
* Added frozen pane
* @param column - column number: 0, 1, 2 ...
* @param row - row number: 0, 1, 2 ...
* @param cell - 'A1'
* @deprecated
*/
freezePane(column: number, row: number, cell: string): void;
/**
* Expects an array containing an object full of column format definitions.
* http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column.aspx
* bestFit
* collapsed
* customWidth
* hidden
* max
* min
* outlineLevel
* phonetic
* style
* width
* @param {Array} columnFormats
*/
setColumnFormats(columnFormats: ExcelColumnFormat[]): void;
export declare class Worksheet {
name: string;
id: string;
_timezoneOffset: number;
relations: any;
columnFormats: ExcelColumnFormat[];
data: (number | string | boolean | Date | null | ExcelColumnMetadata)[][];
mergedCells: string[][];
columns: ExcelColumn[];
sheetProtection: any;
_headers: [
left?: any,
center?: any,
right?: any
];
_footers: [
left?: any,
center?: any,
right?: any
];
_tables: Table[];
_drawings: Array<Table | Drawings>;
_orientation?: string;
_margin?: ExcelMargin;
_rowInstructions: any;
_freezePane: {
xSplit?: number;
ySplit?: number;
cell?: string;
};
sharedStrings: SharedStrings | null;
hyperlinks: never[];
sheetView: SheetView;
showZeros: any;
constructor(config: WorksheetOption);
initialize(config: any): void;
/**
* Returns an object that can be consumed by a Worksheet/Export/Worker
* @returns {Object}
*/
exportData(): {
relations: any;
columnFormats: ExcelColumnFormat[];
data: (string | number | boolean | Date | ExcelColumnMetadata | null)[][];
columns: ExcelColumn[];
mergedCells: string[][];
_headers: [
left?: any,
center?: any,
right?: any
];
_footers: [
left?: any,
center?: any,
right?: any
];
_tables: Table[];
_rowInstructions: any;
_freezePane: {
xSplit?: number;
ySplit?: number;
cell?: string;
};
name: string;
id: string;
};
/**
* Imports data - to be used while inside of a WorksheetExportWorker.
* @param {Object} data
*/
importData(data: any): void;
setSharedStringCollection(stringCollection: SharedStrings): void;
addTable(table: Table): void;
addDrawings(drawings: Drawings): void;
setRowInstructions(rowIndex: number, instructions: ExcelStyleInstruction): void;
/**
* Expects an array length of three.
*
* @see Excel/Worksheet compilePageDetailPiece
* @see <a href='/cookbook/addingHeadersAndFooters.html'>Adding headers and footers to a worksheet</a>
*
* @param {Array} headers [left, center, right]
*/
setHeader(headers: [
left: any,
center: any,
right: any
]): void;
/**
* Expects an array length of three.
*
* @see Excel/Worksheet compilePageDetailPiece
* @see <a href='/cookbook/addingHeadersAndFooters.html'>Adding headers and footers to a worksheet</a>
*
* @param {Array} footers [left, center, right]
*/
setFooter(footers: [
left: any,
center: any,
right: any
]): void;
/**
* Turns page header/footer details into the proper format for Excel.
* @param {type} data
* @returns {String}
*/
compilePageDetailPackage(data: any): string;
/**
* Turns instructions on page header/footer details into something
* usable by Excel.
*
* @param {type} data
* @returns {String|@exp;_@call;reduce}
*/
compilePageDetailPiece(data: string | CharType | any[]): any;
/**
* Creates the header node.
*
* @todo implement the ability to do even/odd headers
* @param {XML Doc} doc
* @returns {XML Node}
*/
exportHeader(doc: XMLDOM): XMLNode;
/**
* Creates the footer node.
*
* @todo implement the ability to do even/odd footers
* @param {XML Doc} doc
* @returns {XML Node}
*/
exportFooter(doc: XMLDOM): XMLNode;
/**
* This creates some nodes ahead of time, which cuts down on generation time due to
* most cell definitions being essentially the same, but having multiple nodes that need
* to be created. Cloning takes less time than creation.
*
* @private
* @param {XML Doc} doc
* @returns {_L8.Anonym$0._buildCache.Anonym$2}
*/
_buildCache(doc: XMLDOM): {
number: XMLNode;
date: XMLNode;
string: XMLNode;
formula: XMLNode;
};
/**
* Runs through the XML document and grabs all of the strings that will
* be sent to the 'shared strings' document.
*
* @returns {Array}
*/
collectSharedStrings(): string[];
toXML(): XMLDOM;
/**
*
* @param {XML Doc} doc
* @returns {XML Node}
*/
exportColumns(doc: XMLDOM): XMLNode;
/**
* Sets the page settings on a worksheet node.
*
* @param {XML Doc} doc
* @param {XML Node} worksheet
* @returns {undefined}
*/
exportPageSettings(doc: XMLDOM, worksheet: XMLNode): void;
/**
* http://www.schemacentral.com/sc/ooxml/t-ssml_ST_Orientation.html
*
* Can be one of 'portrait' or 'landscape'.
*
* @param {'default' | 'portrait' | 'landscape'} orientation
* @returns {undefined}
*/
setPageOrientation(orientation: "default" | "portrait" | "landscape"): void;
/**
* Set page details in inches.
* use this structure:
* {
* top: 0.7
* , bottom: 0.7
* , left: 0.7
* , right: 0.7
* , header: 0.3
* , footer: 0.3
* }
*
* @returns {undefined}
*/
setPageMargin(input: ExcelMargin): void;
/**
* Expects an array of column definitions. Each column definition needs to have a width assigned to it.
*
* @param {Array} columns
*/
setColumns(columns: ExcelColumn[]): void;
/**
* Expects an array of data to be translated into cells.
*
* @param {Array} data Two dimensional array - [ [A1, A2], [B1, B2] ]
* @see <a href='/cookbook/addingDataToAWorksheet.html'>Adding data to a worksheet</a>
*/
setData(data: (number | string | boolean | Date | null | ExcelColumnMetadata)[][]): void;
/**
* Merge cells in given range
*
* @param cell1 - A1, A2...
* @param cell2 - A2, A3...
*/
mergeCells(cell1: string, cell2: string): void;
/**
* Added frozen pane
* @param column - column number: 0, 1, 2 ...
* @param row - row number: 0, 1, 2 ...
* @param cell - 'A1'
* @deprecated
*/
freezePane(column: number, row: number, cell: string): void;
/**
* Expects an array containing an object full of column format definitions.
* http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column.aspx
* bestFit
* collapsed
* customWidth
* hidden
* max
* min
* outlineLevel
* phonetic
* style
* width
* @param {Array} columnFormats
*/
setColumnFormats(columnFormats: ExcelColumnFormat[]): void;
}
/**
* @module Excel/Workbook
*/
declare class Workbook {
id: string;
styleSheet: StyleSheet;
sharedStrings: SharedStrings;
relations: RelationshipManager;
worksheets: Worksheet[];
tables: Table[];
drawings: Drawings[];
media: any;
printTitles: any;
constructor();
initialize(): void;
createWorksheet(config?: any): Worksheet;
getStyleSheet(): StyleSheet;
addTable(table: Table): void;
addDrawings(drawings: Drawings): void;
/**
* Set number of rows to repeat for this sheet.
*
* @param {String} sheet name
* @param {int} number of rows to repeat from the top
* @returns {undefined}
*/
setPrintTitleTop(inSheet: string, inRowCount: number): void;
/**
* Set number of rows to repeat for this sheet.
*
* @param {String} sheet name
* @param {int} number of columns to repeat from the left
* @returns {undefined}
*/
setPrintTitleLeft(inSheet: string, inRowCount: number): void;
addMedia(_type: string, fileName: string, fileData: any, contentType?: string | null): any;
addWorksheet(worksheet: Worksheet): void;
createContentTypes(): XMLDOM;
toXML(): XMLDOM;
createWorkbookRelationship(): XMLDOM;
_generateCorePaths(files: any): void;
_prepareFilesForPackaging(files: {
[path: string]: XMLDOM | string;
}): void;
generateFiles(): Promise<{
[path: string]: string;
}>;
export declare class Workbook {
id: string;
styleSheet: StyleSheet$1;
sharedStrings: SharedStrings;
relations: RelationshipManager;
worksheets: Worksheet[];
tables: Table[];
drawings: Drawings[];
media: any;
printTitles: any;
constructor();
initialize(): void;
createWorksheet(config?: any): Worksheet;
getStyleSheet(): StyleSheet$1;
addTable(table: Table): void;
addDrawings(drawings: Drawings): void;
/**
* Set number of rows to repeat for this sheet.
*
* @param {String} sheet name
* @param {int} number of rows to repeat from the top
* @returns {undefined}
*/
setPrintTitleTop(inSheet: string, inRowCount: number): void;
/**
* Set number of rows to repeat for this sheet.
*
* @param {String} sheet name
* @param {int} number of columns to repeat from the left
* @returns {undefined}
*/
setPrintTitleLeft(inSheet: string, inRowCount: number): void;
addMedia(_type: string, fileName: string, fileData: any, contentType?: string | null): any;
addWorksheet(worksheet: Worksheet): void;
createContentTypes(): XMLDOM;
toXML(): XMLDOM;
createWorkbookRelationship(): XMLDOM;
_generateCorePaths(files: any): void;
_prepareFilesForPackaging(files: {
[path: string]: XMLDOM | string;
}): void;
generateFiles(): Promise<{
[path: string]: string;
}>;
}
type InferOutputByType<T extends 'Blob' | 'Uint8Array'> = T extends 'Blob' ? Blob : T extends 'Uint8Array' ? Uint8Array : any;
export type InferOutputByType<T extends "Blob" | "Uint8Array"> = T extends "Blob" ? Blob : T extends "Uint8Array" ? Uint8Array : any;
/**
* Creates a new workbook.
*/
declare function createWorkbook(): Workbook;
export declare function createWorkbook(): Workbook;
/**

@@ -1011,6 +1017,6 @@ * Turns a workbook into a downloadable file, you can between a 'Blob' or 'Uint8Array',

*/
declare function createExcelFile<T extends 'Blob' | 'Uint8Array' = 'Blob'>(workbook: Workbook, outputType?: T, options?: {
fileFormat?: 'xls' | 'xlsx';
mimeType?: string;
zipOptions?: ZipOptions;
export declare function createExcelFile<T extends "Blob" | "Uint8Array" = "Blob">(workbook: Workbook, outputType?: T, options?: {
fileFormat?: "xls" | "xlsx";
mimeType?: string;
zipOptions?: ZipOptions;
}): Promise<InferOutputByType<T>>;

@@ -1028,8 +1034,7 @@ /**

*/
declare function downloadExcelFile(workbook: Workbook, filename: string, options?: {
downloadType?: 'browser' | 'node';
mimeType?: string;
zipOptions?: ZipOptions;
export declare function downloadExcelFile(workbook: Workbook, filename: string, options?: {
downloadType?: "browser" | "node";
mimeType?: string;
zipOptions?: ZipOptions;
}): Promise<void>;
/**

@@ -1062,10 +1067,7 @@ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their

*/
declare const htmlEscape: (str: string) => string;
declare function isObject(value: unknown): value is object;
declare function isPlainObject(value: unknown): boolean;
declare function isString(value: any): value is string;
declare function pick(object: any, keys: string[]): any;
export declare const htmlEscape: (str: string) => string;
export declare function isObject(value: unknown): value is object;
export declare function isPlainObject(value: unknown): boolean;
export declare function isString(value: any): value is string;
export declare function pick(object: any, keys: string[]): any;
/**

@@ -1087,4 +1089,8 @@ * Generates a unique ID. If `prefix` is given, the ID is appended to it.

*/
declare function uniqueId(prefix?: string): string;
export declare function uniqueId(prefix?: string): string;
export { AbsoluteAnchor, Chart, Drawing, Drawings, type ExcelAlignmentStyle, type ExcelBorderLineStyle, type ExcelBorderStyle, type ExcelColorStyle, type ExcelColumn, type ExcelColumnFormat, type ExcelColumnMetadata, type ExcelFillStyle, type ExcelFontStyle, type ExcelMargin, type ExcelMetadata, type ExcelSortState, type ExcelStyleInstruction, type ExcelTableColumn, OneCellAnchor, Pane, Paths, Picture, Positioning, RelationshipManager, SharedStrings, SheetView, StyleSheet, Table, TwoCellAnchor, Util, Workbook, Worksheet, XMLDOM, XMLNode, createExcelFile, createWorkbook, downloadExcelFile, htmlEscape, isObject, isPlainObject, isString, pick, uniqueId };
export {
StyleSheet$1 as StyleSheet,
};
export {};
{
"name": "excel-builder-vanilla",
"version": "3.0.11",
"version": "3.0.12",
"description": "An easy way of building Excel files with javascript",

@@ -32,3 +32,2 @@ "keywords": [

"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",

@@ -56,3 +55,3 @@ "exports": {

},
"gitHead": "8e2caefe2193b6ae78c85a1cdfb7e9a4867f7dca"
"gitHead": "5e6f2892309591970a2b92e1f342ae617a68d153"
}

@@ -1,3 +0,3 @@

import { Util } from '../Util';
import type { XMLDOM } from '../XMLDOM';
import { Util } from '../Util.js';
import type { XMLDOM } from '../XMLDOM.js';

@@ -4,0 +4,0 @@ /**

@@ -1,7 +0,7 @@

import { uniqueId } from '../../utilities/uniqueId';
import { AbsoluteAnchor } from './AbsoluteAnchor';
import { Chart } from './Chart';
import { OneCellAnchor } from './OneCellAnchor';
import { TwoCellAnchor } from './TwoCellAnchor';
// import { Picture } from './Picture';
import { uniqueId } from '../../utilities/uniqueId.js';
import { AbsoluteAnchor } from './AbsoluteAnchor.js';
import { Chart } from './Chart.js';
import { OneCellAnchor } from './OneCellAnchor.js';
import { TwoCellAnchor } from './TwoCellAnchor.js';
// import { Picture } from './Picture.js';

@@ -8,0 +8,0 @@ /**

@@ -1,3 +0,3 @@

import { Util } from '../Util';
import type { XMLDOM } from '../XMLDOM';
import { Util } from '../Util.js';
import type { XMLDOM } from '../XMLDOM.js';

@@ -4,0 +4,0 @@ /**

@@ -1,5 +0,5 @@

import { uniqueId } from '../../utilities/uniqueId';
import { Util } from '../Util';
import type { XMLDOM } from '../XMLDOM';
import { Drawing } from './Drawing';
import { uniqueId } from '../../utilities/uniqueId.js';
import { Util } from '../Util.js';
import type { XMLDOM } from '../XMLDOM.js';
import { Drawing } from './Drawing.js';

@@ -6,0 +6,0 @@ export class Picture extends Drawing {

@@ -1,3 +0,3 @@

import { Util } from '../Util';
import type { XMLDOM } from '../XMLDOM';
import { Util } from '../Util.js';
import type { XMLDOM } from '../XMLDOM.js';

@@ -4,0 +4,0 @@ export class TwoCellAnchor {

@@ -1,6 +0,6 @@

import { uniqueId } from '../utilities/uniqueId';
import type { Drawing } from './Drawing/Drawing';
import type { Picture } from './Drawing/Picture';
import { RelationshipManager } from './RelationshipManager';
import { Util } from './Util';
import { uniqueId } from '../utilities/uniqueId.js';
import type { Drawing } from './Drawing/Drawing.js';
import type { Picture } from './Drawing/Picture.js';
import { RelationshipManager } from './RelationshipManager.js';
import { Util } from './Util.js';

@@ -7,0 +7,0 @@ /**

@@ -7,3 +7,3 @@ /**

import type { XMLDOM } from './XMLDOM';
import type { XMLDOM } from './XMLDOM.js';

@@ -10,0 +10,0 @@ export class Pane {

@@ -1,4 +0,4 @@

import { uniqueId } from '../utilities/uniqueId';
import { Paths } from './Paths';
import { Util } from './Util';
import { uniqueId } from '../utilities/uniqueId.js';
import { Paths } from './Paths.js';
import { Util } from './Util.js';

@@ -5,0 +5,0 @@ /**

@@ -1,3 +0,3 @@

import { uniqueId } from '../utilities/uniqueId';
import { Util } from './Util';
import { uniqueId } from '../utilities/uniqueId.js';
import { Util } from './Util.js';

@@ -4,0 +4,0 @@ /**

@@ -1,4 +0,4 @@

import { Pane } from './Pane';
import { Util } from './Util';
import type { XMLDOM } from './XMLDOM';
import { Pane } from './Pane.js';
import { Util } from './Util.js';
import type { XMLDOM } from './XMLDOM.js';

@@ -5,0 +5,0 @@ interface SheetViewOption {

@@ -1,7 +0,7 @@

import type { ExcelFontStyle, ExcelStyleInstruction } from '../interfaces';
import { isObject, isString } from '../utilities/isTypeOf';
import { pick } from '../utilities/pick';
import { uniqueId } from '../utilities/uniqueId';
import { Util } from './Util';
import type { XMLDOM } from './XMLDOM';
import type { ExcelFontStyle, ExcelStyleInstruction } from '../interfaces.js';
import { isObject, isString } from '../utilities/isTypeOf.js';
import { pick } from '../utilities/pick.js';
import { uniqueId } from '../utilities/uniqueId.js';
import { Util } from './Util.js';
import type { XMLDOM } from './XMLDOM.js';

@@ -8,0 +8,0 @@ /**

@@ -1,6 +0,6 @@

import type { ExcelSortState, ExcelTableColumn } from '../interfaces';
import { isString } from '../utilities/isTypeOf';
import { uniqueId } from '../utilities/uniqueId';
import { Util } from './Util';
import type { XMLDOM } from './XMLDOM';
import type { ExcelSortState, ExcelTableColumn } from '../interfaces.js';
import { isString } from '../utilities/isTypeOf.js';
import { uniqueId } from '../utilities/uniqueId.js';
import { Util } from './Util.js';
import type { XMLDOM } from './XMLDOM.js';

@@ -7,0 +7,0 @@ /**

@@ -1,3 +0,3 @@

import { isPlainObject } from '../utilities/isTypeOf';
import { XMLDOM, type XMLNode } from './XMLDOM';
import { isPlainObject } from '../utilities/isTypeOf.js';
import { XMLDOM, type XMLNode } from './XMLDOM.js';

@@ -4,0 +4,0 @@ /**

@@ -1,11 +0,11 @@

import { uniqueId } from '../utilities/uniqueId';
import type { Drawings } from './Drawings';
import { Paths } from './Paths';
import { RelationshipManager } from './RelationshipManager';
import { SharedStrings } from './SharedStrings';
import { StyleSheet } from './StyleSheet';
import type { Table } from './Table';
import { Util } from './Util';
import { Worksheet } from './Worksheet';
import { XMLDOM } from './XMLDOM';
import { uniqueId } from '../utilities/uniqueId.js';
import type { Drawings } from './Drawings.js';
import { Paths } from './Paths.js';
import { RelationshipManager } from './RelationshipManager.js';
import { SharedStrings } from './SharedStrings.js';
import { StyleSheet } from './StyleSheet.js';
import type { Table } from './Table.js';
import { Util } from './Util.js';
import { Worksheet } from './Worksheet.js';
import { XMLDOM } from './XMLDOM.js';

@@ -12,0 +12,0 @@ /**

@@ -1,11 +0,11 @@

import type { ExcelColumn, ExcelColumnFormat, ExcelColumnMetadata, ExcelMargin, ExcelStyleInstruction } from '../interfaces';
import { isObject, isString } from '../utilities/isTypeOf';
import { uniqueId } from '../utilities/uniqueId';
import type { Drawings } from './Drawings';
import { RelationshipManager } from './RelationshipManager';
import type { SharedStrings } from './SharedStrings';
import { SheetView } from './SheetView';
import type { Table } from './Table';
import { Util } from './Util';
import type { XMLDOM, XMLNode } from './XMLDOM';
import type { ExcelColumn, ExcelColumnFormat, ExcelColumnMetadata, ExcelMargin, ExcelStyleInstruction } from '../interfaces.js';
import { isObject, isString } from '../utilities/isTypeOf.js';
import { uniqueId } from '../utilities/uniqueId.js';
import type { Drawings } from './Drawings.js';
import { RelationshipManager } from './RelationshipManager.js';
import type { SharedStrings } from './SharedStrings.js';
import { SheetView } from './SheetView.js';
import type { Table } from './Table.js';
import { Util } from './Util.js';
import type { XMLDOM, XMLNode } from './XMLDOM.js';

@@ -12,0 +12,0 @@ interface CharType {

@@ -1,2 +0,2 @@

import { htmlEscape } from '../utilities/escape';
import { htmlEscape } from '../utilities/escape.js';

@@ -3,0 +3,0 @@ type XMLNodeOption = {

import { type ZipOptions, strToU8, zip } from 'fflate';
import { Workbook } from './Excel/Workbook';
import { Workbook } from './Excel/Workbook.js';

@@ -5,0 +5,0 @@ type InferOutputByType<T extends 'Blob' | 'Uint8Array'> = T extends 'Blob' ? Blob : T extends 'Uint8Array' ? Uint8Array : any;

@@ -1,25 +0,25 @@

export { AbsoluteAnchor } from './Excel/Drawing/AbsoluteAnchor';
export { Chart } from './Excel/Drawing/Chart';
export { Drawing } from './Excel/Drawing/Drawing';
export { OneCellAnchor } from './Excel/Drawing/OneCellAnchor';
export { Picture } from './Excel/Drawing/Picture';
export { TwoCellAnchor } from './Excel/Drawing/TwoCellAnchor';
export { Drawings } from './Excel/Drawings';
export { Pane } from './Excel/Pane';
export { Paths } from './Excel/Paths';
export { Positioning } from './Excel/Positioning';
export { RelationshipManager } from './Excel/RelationshipManager';
export { SharedStrings } from './Excel/SharedStrings';
export { SheetView } from './Excel/SheetView';
export { StyleSheet } from './Excel/StyleSheet';
export { Table } from './Excel/Table';
export { Util } from './Excel/Util';
export { Workbook } from './Excel/Workbook';
export { Worksheet } from './Excel/Worksheet';
export { XMLDOM, XMLNode } from './Excel/XMLDOM';
export { createExcelFile, createWorkbook, downloadExcelFile } from './factory';
export * from './interfaces';
export { htmlEscape } from './utilities/escape';
export { isObject, isPlainObject, isString } from './utilities/isTypeOf';
export { pick } from './utilities/pick';
export { uniqueId } from './utilities/uniqueId';
export { AbsoluteAnchor } from './Excel/Drawing/AbsoluteAnchor.js';
export { Chart } from './Excel/Drawing/Chart.js';
export { Drawing } from './Excel/Drawing/Drawing.js';
export { OneCellAnchor } from './Excel/Drawing/OneCellAnchor.js';
export { Picture } from './Excel/Drawing/Picture.js';
export { TwoCellAnchor } from './Excel/Drawing/TwoCellAnchor.js';
export { Drawings } from './Excel/Drawings.js';
export { Pane } from './Excel/Pane.js';
export { Paths } from './Excel/Paths.js';
export { Positioning } from './Excel/Positioning.js';
export { RelationshipManager } from './Excel/RelationshipManager.js';
export { SharedStrings } from './Excel/SharedStrings.js';
export { SheetView } from './Excel/SheetView.js';
export { StyleSheet } from './Excel/StyleSheet.js';
export { Table } from './Excel/Table.js';
export { Util } from './Excel/Util.js';
export { Workbook } from './Excel/Workbook.js';
export { Worksheet } from './Excel/Worksheet.js';
export { XMLDOM, XMLNode } from './Excel/XMLDOM.js';
export { createExcelFile, createWorkbook, downloadExcelFile } from './factory.js';
export * from './interfaces.js';
export { htmlEscape } from './utilities/escape.js';
export { isObject, isPlainObject, isString } from './utilities/isTypeOf.js';
export { pick } from './utilities/pick.js';
export { uniqueId } from './utilities/uniqueId.js';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc