Releases: papb/json-excel
Releases · papb/json-excel
v2.0.2
v2.0.1
v2.0.0
Breaking Changes
-
Changed the way you import the package and the method name:
-
JavaScript:
- const jsonToExcel = require('@papb/json-excel'); + const { exportJsonToExcel } = require('@papb/json-excel');
-
TypeScript:
- import jsonToExcel = require('@papb/json-excel'); + import { exportJsonToExcel } from '@papb/json-excel';
-
-
Changed the order of arguments in the export function (the path is the first argument now):
- await jsonToExcel(sheets, pathToFile, options); + await exportJsonToExcel(pathToFile, sheets, options);
Features
-
Added browser support (see the readme for browser usage instructions)
-
Added a new
jsonToExcel
function (recall that the previousjsonToExcel
function was renamed toexportJsonToExcel
) that returns an ExcelJS.Workbook that you can work with, instead of generating a file. However, if you just want to make some adjustments before generating the file, thebeforeSave
hook is recommended instead.