Search code examples
angulartypescriptxlsx

Why does the Inbuild property "SheetNames" is not woking?


enter image description here**Error: src/app/Components/upload-file/upload-file.component.ts:22:33 - error TS2339: Property 'SheetNames' does not exist on type 'number'.

22 var sheetNames = workBook.SheetNames; ~~~~~~~~~~**


Solution

  • Remove the minus '-' you have in front of XLSX.read(...).

    The + or - operator infront of a value will effectively convert it to a number.