Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

273
Views
xlsx package:Write excel file to a custom path

I am trying to write an array of objects to excel using xlsx package.

I want to write the file to a path instead of current directory

 const fileName ='ouptputs/test.xlsx'
const workSheet = XLSX.utils.json_to_sheet(data);
const wb = XLSX.utils.book_new();
                
 XLSX.utils.book_append_sheet(wb, workSheet,fileName);
 const s = XLSX.writeFile(wb, fileName,{
     type:"file"
 });

But executing this i m getting the error

Sheet name cannot contain : \ / ? *

So how do i specify the path instead of generating the file to current dir

I searched in their doc https://github.com/SheetJS/sheetjs#writing-options but couldn't able to find the documentation about the custom path

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!