I imported the style like this:
@Component({
selector: 'excel-viewer',
templateUrl: 'excel-viewer.component.html',
styleUrls: [
'../../../../node_modules/luckysheet/dist/css/luckysheet.css',
'../../../../node_modules/luckysheet/dist/plugins/css/pluginsCss.css',
'../../../../node_modules/luckysheet/dist/plugins/plugins.css',
'../../../../node_modules/luckysheet/dist/assets/iconfont/iconfont.css'
],
...
Is there a better way to do this?
And also the script files like this:
import { luckysheet } from '../../../../node_modules/luckysheet/dist/luckysheet.umd.js'
import { luckysheetPlugin } from '../../../../node_modules/luckysheet/dist/plugins/js/plugin.js'
import { LuckyExcelCjs } from '../../../../node_modules/luckyexcel/dist/luckyexcel.cjs.js'
import { LuckyExcelEsm } from '../../../../node_modules/luckyexcel/dist/luckyexcel.esm.js'
import { LuckyExcel } from '../../../../node_modules/luckyexcel/dist/luckyexcel.umd.js'
(I do not know how to run the script instead of just importing them like this)
And now I have these errors:
ERROR in src/app/viewer/excel/excel-viewer.component.ts(82,20): error TS2339: Property 'luckysheet' does not exist on type 'Window'.
src/app/viewer/excel/excel-viewer.component.ts(84,20): error TS2339: Property 'luckysheet' does not exist on type 'Window'.
src/app/viewer/excel/excel-viewer.component.ts(96,27): error TS2339: Property 'selectedIndex' does not exist on type 'HTMLElement'.
src/app/viewer/excel/excel-viewer.component.ts(97,27): error TS2339: Property 'options' does not exist on type 'HTMLElement'.
src/app/viewer/excel/excel-viewer.component.ts(98,26): error TS2339: Property 'options' does not exist on type 'HTMLElement'.
src/app/viewer/excel/excel-viewer.component.ts(111,20): error TS2339: Property 'luckysheet' does not exist on type 'Window'.
src/app/viewer/excel/excel-viewer.component.ts(113,20): error TS2339: Property 'luckysheet' does not exist on type 'Window'.
src/app/viewer/excel/excel-viewer.component.ts(125,27): error TS2339: Property 'selectedIndex' does not exist on type 'HTMLElement'.
src/app/viewer/excel/excel-viewer.component.ts(126,27): error TS2339: Property 'options' does not exist on type 'HTMLElement'.
src/app/viewer/excel/excel-viewer.component.ts(140,18): error TS2339: Property 'src' does not exist on type 'HTMLElement'.
Can you help me?