[]
        
(Showing Draft Content)

ISheetTabs

Interface ISheetTabs

All Superinterfaces:
Iterable<ISheetTab>

public interface ISheetTabs extends Iterable<ISheetTab>
Represents a collection of all sheet tabs in a workbook.

Use this interface to access sheet tab information such as the tab count, or to retrieve a specific tab by index or name. An ISheetTabs instance is typically obtained from Workbook.getSheetTabs().


 workbook.open("import.sjs");
 ISheetTabs sheetTabs = workbook.getSheetTabs();
 if (sheetTabs.getCount() > 0) {
     ISheetTab firstTab = sheetTabs.get(0);
 }
 
  • Method Summary

    Modifier and Type
    Method
    Description
    get(int index)
    Gets the sheet tab at the specified index.
    get(String name)
    Gets the sheet tab with the specified name.
    int
    Gets the number of sheet tabs in the workbook.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • getCount

      int getCount()
      Gets the number of sheet tabs in the workbook.
      
       workbook.open("import.sjs");
       ISheetTabs sheetTabs = workbook.getSheetTabs();
       int count = sheetTabs.getCount();
       
      Returns:
      The sheet tab count in the workbook.
    • get

      ISheetTab get(int index)
      Gets the sheet tab at the specified index. The index starts at 0.
      
       workbook.open("import.sjs");
       ISheetTabs sheetTabs = workbook.getSheetTabs();
       if (sheetTabs.getCount() > 0) {
           ISheetTab firstTab = sheetTabs.get(0);
       }
       
      Parameters:
      index - The sheet tab index, starting at 0.
      Returns:
      The sheet tab at the specified index, or null if no sheet tab exists at that index.
    • get

      ISheetTab get(String name)
      Gets the sheet tab with the specified name.
      
       workbook.open("import.sjs");
       ISheetTabs sheetTabs = workbook.getSheetTabs();
       if (sheetTabs.getCount() > 0) {
           ISheetTab sheetTab = sheetTabs.get("Sheet1");
       }
       
      Parameters:
      name - The name of the sheet tab.
      Returns:
      The sheet tab with the specified name, or null if no sheet tab with that name exists.