Visa och dölj flikar i arbetsboken i xlsx4j

Aspose.Cells - Visa och dölj flikar i arbetsboken

Aspose.Cells tillhandahåller en klass, arbetsbok, som representerar en Microsoft Excel-fil. Klassen Workbook tillhandahåller ett brett utbud av egenskaper och metoder för att hantera en Excel-fil. För att kontrollera synligheten för flikar i en Excel-fil kan utvecklare använda Workbook-klassens setShowTabs-metod.

Java

 //Instantiating a Workbook object by excel file path

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

//Hiding the tabs of the Excel file

workbook.getSettings().setShowTabs(false);

//Saving the modified Excel file in default (that is Excel 2003) format

workbook.save(dataDir + "AsposeHideTabs.xls");

// ===============================================================

//Displaying the tabs of the Excel file

workbook.getSettings().setShowTabs(true);

//Saving the modified Excel file in default (that is Excel 2003) format

workbook.save(dataDir + "AsposeDisplayTabs.xls");

Ladda ner Running Code

Ladda ner provkod