Skip to content

Instantly share code, notes, and snippets.

@natergj
Created September 30, 2018 22:57
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 natergj/8cb84d3d2fa4be6e00ae74bf999027dc to your computer and use it in GitHub Desktop.
Save natergj/8cb84d3d2fa4be6e00ae74bf999027dc to your computer and use it in GitHub Desktop.
hide first tab for workbooks created with excel4node
const xl = require('excel4node');
const wb = new xl.Workbook({
workbookView: {
activeTab: 1,
},
});
const hiddenWorksheet = wb.addWorksheet('Hidden', {
hidden: true,
});
hiddenWorksheet.cell(1, 1).string('I am hidden');
const activeWorksheet = wb.addWorksheet('Active');
activeWorksheet.cell(1, 1).string('You can see me');
wb.write('Hidden.xlsx');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment