When my Excel spreadsheet opens, only the tab for the last worksheet is visible. How do I make the tab for the first worksheet visible (this is the selected worksheet)?<br><hr size="1" align="left" width="25%"><span style="text-color:gray">This message was posted using Page2Forum from <a href="http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/aspose.cells.worksheetcollection.ishidden.html">IsHidden Property - Aspose.Cells for .NET</a></span>
Hi AJBiagioli,
Please share your Code and Template file with us.
To Un-Hide any worksheet, you can simply set worksheets IsVisible property to True.
Sample Code is as under,
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(@“C:\TestBook.xlsx”);
wb.Worksheets[0].IsVisible = true; //Set first worksheet visible
wb.Worksheets[0].IsSelected = true;
wb.Save(@“c:\testbook2.xlsx”);
wb.Worksheets[0].IsSelected = true;
wb.Save(@“c:\testbook2.xlsx”);
wb.Worksheets[0].VisibilityType = Aspose.Cells.VisibilityType.Visible;
//instead of
wb.Worksheets[0].IsVisible = true;
wb.Worksheets[0].IsVisible = true;
Hi,
If you are using Evaluation version of Aspose.Cells for .NET, then Evaluation Worksheet will be visible, you cannot hide it unless you use it in Licensed Mode.
Therefore please use it in licensed mode. If you want to use it in licensed mode, you will have to purchase a license for it.
Use this code to activate the worksheet of your choice. For example, the code below makes the third worksheet activated or in your words, makes the third worksheet tab visible.
C#
string path = @“F:\Downloads\issue\QA__Cash_Flow.xlsx”;
Aspose.Cells.License lic = new License();
lic.SetLicense(m_LicPath);
Workbook m_workbook = new Workbook(path);
m_workbook.Worksheets.ActiveSheetIndex = 2; //makes the third worksheet tab visible
m_workbook.Save(path + “.out.xlsx”, SaveFormat.Xlsx);
Aspose.Cells.License lic = new License();
lic.SetLicense(m_LicPath);
Workbook m_workbook = new Workbook(path);
m_workbook.Worksheets.ActiveSheetIndex = 2; //makes the third worksheet tab visible
m_workbook.Save(path + “.out.xlsx”, SaveFormat.Xlsx);