How to hide sheet in excel without using VBA code

HI,

We can achieve it using ClosedXML as the following sample.

image

Using wb As New ClosedXML.Excel.XLWorkbook(filename)
    Dim sheet As ClosedXML.Excel.IXLWorksheet = wb.Worksheet(sheetName)
        sheet.Hide()
    wb.Save()
End Using

Sample20231030-3L.zip (9.3 KB)

Regards,