forked from sheetjs/sheetjs
		
	xlsx: Fix miscellaneous lints.
This commit is contained in:
		
							parent
							
								
									0fb38af783
								
							
						
					
					
						commit
						cda05f3b45
					
				
							
								
								
									
										14
									
								
								index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										14
									
								
								index.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -4,21 +4,21 @@ | ||||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
 | ||||
| 
 | ||||
| /** Attempts to read filename and parse */ | ||||
| export declare function readFile(filename: string, opts?: IParsingOptions): IWorkBook; | ||||
| export function readFile(filename: string, opts?: IParsingOptions): IWorkBook; | ||||
| /** Attempts to parse data */ | ||||
| export declare function read(data: any, opts?: IParsingOptions): IWorkBook; | ||||
| export function read(data: any, opts?: IParsingOptions): IWorkBook; | ||||
| /** Attempts to write workbook data to filename */ | ||||
| export declare function writeFile(data: IWorkBook, filename: string, opts?: IWritingOptions): any; | ||||
| export function writeFile(data: IWorkBook, filename: string, opts?: IWritingOptions): any; | ||||
| /** Attempts to write the workbook data */ | ||||
| export declare function write(data: IWorkBook, opts?: IWritingOptions): any; | ||||
| export function write(data: IWorkBook, opts?: IWritingOptions): any; | ||||
| 
 | ||||
| export declare var utils: IUtils; | ||||
| export const utils: IUtils; | ||||
| 
 | ||||
| export interface IProperties { | ||||
|     LastAuthor?: string | ||||
|     LastAuthor?: string; | ||||
|     Author?: string; | ||||
|     CreatedDate?: Date; | ||||
|     ModifiedDate?: Date | ||||
|     ModifiedDate?: Date; | ||||
|     Application?: string; | ||||
|     AppVersion?: string; | ||||
|     Company?: string; | ||||
|  | ||||
| @ -1,17 +1,17 @@ | ||||
| import xlsx = require('xlsx'); | ||||
| 
 | ||||
| var options: xlsx.IParsingOptions = { | ||||
| const options: xlsx.IParsingOptions = { | ||||
|     cellDates: true | ||||
| }; | ||||
| 
 | ||||
| var workbook = xlsx.readFile('test.xlsx', options); | ||||
| var otherworkbook = xlsx.readFile('test.xlsx', {type: 'file'}); | ||||
| const workbook = xlsx.readFile('test.xlsx', options); | ||||
| const otherworkbook = xlsx.readFile('test.xlsx', {type: 'file'}); | ||||
| 
 | ||||
| console.log(workbook.Props.Author); | ||||
| 
 | ||||
| var firstsheet: string = workbook.SheetNames[0]; | ||||
| const firstsheet: string = workbook.SheetNames[0]; | ||||
| 
 | ||||
| var firstworksheet = workbook.Sheets[firstsheet]; | ||||
| const firstworksheet = workbook.Sheets[firstsheet]; | ||||
| 
 | ||||
| console.log(firstworksheet["A1"]); | ||||
| 
 | ||||
| @ -20,6 +20,6 @@ interface tester { | ||||
|     age: number; | ||||
| } | ||||
| 
 | ||||
| var jsonvalues: tester[] = xlsx.utils.sheet_to_json<tester>(firstworksheet); | ||||
| var csv = xlsx.utils.sheet_to_csv(firstworksheet); | ||||
| var formulae = xlsx.utils.sheet_to_formulae(firstworksheet); | ||||
| const jsonvalues: tester[] = xlsx.utils.sheet_to_json<tester>(firstworksheet); | ||||
| const csv = xlsx.utils.sheet_to_csv(firstworksheet); | ||||
| const formulae = xlsx.utils.sheet_to_formulae(firstworksheet); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user