Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Unassigned: Hide does not hide Worksheet [9453]

$
0
0
Can someone explain why the code below does not actually hide the worksheet?

workbook.Worksheet("Saber Tooth Audit Legend").Hide();
workbook.Worksheet("Saber Tooth Audit Legend").Visibility = XLWorksheetVisibility.Hidden;
workbook.SaveAs(destination);

Does Hide not actually Hide? When I open the Excel file it's worse than not hidden the focus is set to that tab in particular. What the heck is going on?
Also when I Unhide a worksheet it does not Unhide().
Is it my code?


Comments: Any update on this? I'm having the same issue. Not sure if this is the problem or not, but the value of the ClosedXML constants don't match the associated constants in Excel: ClosedXML XLWorksheetVisibility.Visible = 0 XLWorksheetVisibility.Hidden = 1 XLWorksheetVisibility.VeryHidden = 2 Excel xlSheetVisible = -1 xlSheetHidden = 0 xlSheetVeryHidden = 2

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>