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