-1

Is it possible to create, read or delete a hidden named item in the Name Manager in Excel using Excel Office JS?

I am aware that it is possible to create a very hidden sheet, so I am wondering if the same thing is possible with named items.

1 Answers1

0

With Office JavaScript API you can programmatically hide and unhide rows by updating the rowHidden property on the range object.

Excel.run(function (context) {

    // Hide rows 2-5 in 'Sheet1'
    var range = context.workbook.worksheets.getItem("Sheet1").getRange("1:1");
    range.rowHidden = true;

    return context.sync()
        .then(function() {
            console.log("Rows 2-5 have been hidden.");
        });
}).catch(function (error) {
    console.log(error);
});

To unhide rows in a range, set the rowHidden property to false. The property represents if all rows in the current range are hidden. Value is true when all rows in a range are hidden. Value is false when no rows in the range are hidden. Value is null when some rows in a range are hidden and other rows in the same range are not hidden.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45