There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Strange file error using package.Workbook.Worksheets[i].Hidden
First of all, i think the problem is in excel reading the file, but i have to detail a little.
I use this great library to open xlsx file from asp.net, add data and stream the file to the client with no update on disk; works like a charm except...
In some cases i have to hide a sheet depending on user selection and i used package.Workbook.Worksheets.Hidden = eWorkSheetHidden.Hidden or VeryHidden.
If i send the file with a sheet Hidden and open it, Excel show it but as i print preview the application crashes.
If instead of print preview i save the file to desktop, close excel and re-open it again and print preview, 90% cases no error.
Luckily (for me) i can delete the sheet instead of hiding, so i bypass the problem; however i wanted to detail it.