Display or Hide Tabs in Aspose.Cells

Below is a complete example that opens an Excel file (book1.xls), hides its tabs and saves the modified file as output.xls.

You can see that Book1.xls file contains tabs in the figure below. After the example code is executed, the tabs are hidden, as you can see from the screenshot of the output.xls file below.

book1.xls: Excel file before any modification

todo:image_alt_text

output.xls: Excel file after modification

todo:image_alt_text

C#

 //Instantiating a Workbook object

//Opening the Excel file

Workbook workbook = new Workbook("book1.xls");

//Hiding the tabs of the Excel file

workbook.Settings.ShowTabs = false;

//Saving the modified Excel file

workbook.Save("output.xls");

Controlling the Tab Bar Width

C#

 //Adjusting the sheet tab bar width

workbook.Worksheets.SheetTabBarWidth = 800;

Download Running Code

Download Sample Code

  • GitHub