-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
import {IJsonSheet, xlsx} from "json-as-xlsx"
const data: IJsonSheet[] = [{
sheet: 'BazaDizainerov-Kyiv-15-50',
columns: [
{ label: 'name', value: 'name' },
{ label: 'email', value: 'email' },
{ label: 'phone', value: 'phone' },
{ label: 'city', value: 'city' },
{ label: 'company_type', value: 'company_type' },
{ label: 'experience', value: 'experience' },
{ label: 'portfolio', value: 'portfolio' },
{ label: 'price', value: 'price' },
{ label: 'opys_robit', value: 'opys_robit' }
],
content: products
}]
fs.writeFileSync('data.xlsx', xlsx(data))Here's what i get:
TypeError: xlsx is not a function
at file:///home/offeex/Code/Standalone/designer-parser/index.ts:54:31
at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:66:12)
Metadata
Metadata
Assignees
Labels
No labels