Skip to content

Instantly share code, notes, and snippets.

@aspose-com-kb
Last active May 17, 2024 10:21
Show Gist options
  • Save aspose-com-kb/b3192f9431ee9b9b75dbacb0863b80ce to your computer and use it in GitHub Desktop.
Save aspose-com-kb/b3192f9431ee9b9b75dbacb0863b80ce to your computer and use it in GitHub Desktop.
Unmerge Cells in Excel using Node.js. For further details: https://kb.aspose.com/cells/nodejs/unmerge-cells-in-excel-using-nodejs/
const asposecells = require('aspose.cells');
// Create a workbook.
const wb = new asposecells.Workbook("book1.xlsx");
// Obtain the first sheet
const sheet = wb.getWorksheets().get(0);
const mergedRange = sheet.getCells().createRange("H1:L10");
mergedRange.unMerge();
// Save the output
wb.save("output.xlsx");
console.log("Cells un-merged successfully!!!");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment