From 4de60e9ca9b5038533625d10425aa0ab2504f2cb Mon Sep 17 00:00:00 2001 From: Hagai Cohen Date: Thu, 11 Aug 2016 23:18:32 +0300 Subject: [PATCH] Aligned xlsx types to master xlsx/xlsx.d.ts --- index.d.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 61e7346..6308f66 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3,10 +3,9 @@ // Definitions by: themauveavenger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - export declare function readFile(filename: string, opts?: IParsingOptions): IWorkBook; export declare function read(data: any, opts?: IParsingOptions): IWorkBook; +export declare function write(data: any, opts?: IParsingOptions): any; export declare var utils: IUtils; export interface IProperties { @@ -41,6 +40,7 @@ export interface IParsingOptions { bookSheets?: boolean; bookVBA?: boolean; password?: string; + bookType?: string; /** * Possible options: 'binary', 'base64', 'buffer', 'file' @@ -127,8 +127,19 @@ export interface IWorkSheetCell { s?: string; } +export interface ICell { + c: number; + r: number; +} + export interface IUtils { - sheet_to_json(worksheet: IWorkSheet): T[]; + sheet_to_json(worksheet: IWorkSheet, opts?: { + raw?: boolean; + range?: any; + header?: "A"|number|string[]; + }): T[]; sheet_to_csv(worksheet: IWorkSheet): any; sheet_to_formulae(worksheet: IWorkSheet): any; + encode_cell(cell: ICell): any; + encode_range(s: ICell, e: ICell): any; }