Skip to content

Instantly share code, notes, and snippets.

@bekverdyan
Created November 23, 2022 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bekverdyan/a88ac51069c1b9923c9fbc2ba2574c49 to your computer and use it in GitHub Desktop.
Save bekverdyan/a88ac51069c1b9923c9fbc2ba2574c49 to your computer and use it in GitHub Desktop.
SheetJS code sample
const test = async (file: File) => {
  var buffer = await file.arrayBuffer();
  var workbook = XLSX.read(buffer, {bookVBA: true, cellStyles: true});
  var combo = workbook.vbaraw;
  console.log(combo); // The vbaraw is undefined
  
  XLSX.writeFile(workbook, 'blank.xlsm', {bookVBA: true});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment