xlsx
Type module
Sources
Items from xlsx can be imported/included and used via following ways.
/** * Import via: xlsx.ts * Access items like: $xlsx.myVariable */import * as $xlsx from "@amcharts/amcharts5/xlsx";Variables
CFBType
anyDefaultunsupportedObject("CFB")crcTableType
Int32Array|undefinedCTType
"application/vnd.openxmlformats-"Default"application/vnd.openxmlformats-"DAYType
86400000Default86400000EPOCHType
numberDefaultDate.UTC(1899, 11, 30)NS_MAINType
"http://schemas.openxmlformats.org/spreadsheetml/2006/main"Default"http://schemas.openxmlformats.org/spreadsheetml/2006/main"NS_PKG_RELType
"http://schemas.openxmlformats.org/package/2006/relationships"Default"http://schemas.openxmlformats.org/package/2006/relationships"NS_RELType
"http://schemas.openxmlformats.org/officeDocument/2006/relationships"Default"http://schemas.openxmlformats.org/officeDocument/2006/relationships"readType (args:
any[]) =>TDefaultunsupported("read", () => book_new())readFileType (args:
any[]) =>TDefaultunsupported("readFile", () => book_new())readFileSyncType (args:
any[]) =>TDefaultreadFileset_cptableType (args:
any[]) =>TDefaultunsupported("set_cptable", toNothing)set_fsType (args:
any[]) =>TDefaultunsupported("set_fs", toNothing)SSFType
anyDefaultunsupportedObject("SSF")streamType
anyDefaultunsupportedObject("stream")versionType
"amcharts"Default"amcharts"warnedType
objectwriteFileAsyncType (args:
any[]) =>TDefaultunsupported("writeFileAsync", toNothing)writeFileSyncType
writeFileDefaultwriteFilewriteFileXLSXType
writeFileDefaultwriteFilewriteXLSXType
writeDefaultwriteXMLType
"<?xml version="1.0" encoding="UTF-8" standalone="yes"?>"Default"<?xml version="1.0" encoding="UTF-8" standalone="yes"?> "
Functions
aoa_to_sheet(data:any[][],
options?:ISheetOptions)Returns
IWorkSheetappPropsXml(props:object)Returns
stringbase64(bytes:Uint8Array)Returns
stringbinaryString(bytes:Uint8Array)Returns
stringbook_append_sheet(wb:IWorkBook,
ws:IWorkSheet,
name?:undefined|string,
roll?:undefined|false|true)Returns
stringbook_new(ws?:IWorkSheet,
name?:undefined|string)Returns
IWorkBookcell_set_hyperlink(cell:ICell,
target?:undefined|string,
tooltip?:undefined|string)Returns
ICellcell_set_internal_link(cell:ICell,
range:string,
tooltip?:undefined|string)Returns
ICellcell_set_number_format(cell:ICell,
format:string|number)Returns
ICellcellXml(ref:string,
cell:ICell,
styles:Styles,
strings:SharedStrings)Returns
stringcheckSheetName(name:string)Returns
voidcheckWriteOptions(wb:IWorkBook,
o:IWriteOptions)Returns
voidcolumnWidth(col: { wch:undefined|number, width:undefined|number, wpx:undefined|number})Returns
number|undefinedColumn width in Excel's units, for Calibri 11 (7 pixels a digit)
corePropsXml(props:object)Returns
stringcrc32(bytes:Uint8Array)Returns
numberdecode_cell(cell:string)Returns
ICellAddressdecode_col(col:string)Returns
numberdecode_range(range:string)Returns
IRangedecode_row(row:string)Returns
numberencode_cell(cell:ICellAddress)Returns
stringencode_col(col:number)Returns
stringencode_range(s:ICellAddress|IRange,
e?:ICellAddress)Returns
stringencode_row(row:number)Returns
stringescapeAttr(value:any)Returns
stringescapeText(value:string)Returns
stringEscapes cell text. Characters XML can't hold are written the way Excel writes them, as xHHHH, so text that already looks like that is escaped too.
escapeXml(value:any)Returns
stringhasSheet(wb:IWorkBook,
name:string)Returns
booleanisoDate(value:any)Returns
string|undefinedjson_to_sheet(data:any[],
options?:ISheetOptions)Returns
IWorkSheetlocalToUTC(date:Date)Returns
DateA local date as a date whose UTC parts are its wall-clock time.
makeCell(value:any,
options:ISheetOptions)Returns
ICell|undefinedresolveOrigin(ws:IWorkSheet,
origin:ISheetOptions["origin"])Returns
ICellAddressserial(time:number)Returns
numberExcel's serial number for a time whose UTC parts are the wall-clock time.
setOwn(target:any,
key:string,
value:any)Returns
voidsheet_add_aoa(ws:IWorkSheet|null|undefined,
data:any[][],
options?:ISheetOptions)Returns
IWorkSheetsheet_add_json(ws:IWorkSheet|null|undefined,
data:any[],
options?:ISheetOptions)Returns
IWorkSheetsheet_get_cell(ws:IWorkSheet,
address:string|ICellAddress)Returns
ICellsheet_new(options?:ISheetOptions)Returns
IWorkSheetsheetXml(ws:IWorkSheet,
styles:Styles,
strings:SharedStrings)Returns
ISheetPartsplit_cell(cell:string)Returns
string[]toDate(value:Date|number|string)Returns
DateConverts anything to Date object.
toEmptyArray()Returns
never[]toEmptyString()Returns
stringtoFirst(first:any)Returns
anytoNothing()Returns
undefinedunsupported(name:string,
result: (args:any[]) =>T)Returns (args:
any[]) =>TunsupportedObject(name:string)Returns
anyutf8(value:string)Returns
Uint8Arraywarn(message:string)Returns
voidwrite(wb:IWorkBook,
options?:IWriteOptions)Returns
anywriteBytes(wb:IWorkBook,
o:IWriteOptions)Returns
Uint8ArraywriteFile(wb:IWorkBook,
filename:string,
options?:IWriteOptions)Returns
voidxmlChars(value:string)Returns
stringzip(files:Array)Returns
Uint8ArrayAn uncompressed ZIP archive, as SheetJS writes by default