Skip to content

xlsx is not a function #87

@debuxxed

Description

@debuxxed
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

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions