[]
        
(Showing Draft Content)

ICustomView

Interface ICustomView


public interface ICustomView
Represents a custom workbook view.

An ICustomView records the workbook view state captured when the custom view was created. The getName() method identifies the custom view. getRowColSettings() indicates whether hidden rows and columns and filter information are included, and getPrintSettings() indicates whether print settings are included. Custom views can be created from Workbook.getCustomViews(), applied with show(), and removed with delete().


 ICustomView customView = workbook.getCustomViews().add("ReviewView", true, true);
 String name = customView.getName();
 customView.show();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes this custom view from its parent ICustomViews collection.
    Gets the name of the custom view.
    boolean
    Gets a value indicating whether print settings are included in this custom view.
    boolean
    Gets whether the custom view includes settings for hidden rows and columns, including filter information.
    void
    Applies this custom view to all worksheets in the workbook.
  • Method Details

    • getName

      String getName()
      Gets the name of the custom view.

      This method returns the name assigned to the ICustomView when it was created.

      
       ICustomView customView = workbook.getCustomViews().add("ReviewView", true, true);
       String name = customView.getName();
       
      Returns:
      The name of the custom view.
    • getRowColSettings

      boolean getRowColSettings()
      Gets whether the custom view includes settings for hidden rows and columns, including filter information.

      This property indicates whether row and column visibility settings are stored with the custom view.

      
       ICustomView customView = workbook.getCustomViews().add("HiddenRows", false, true);
       boolean includeRowColSettings = customView.getRowColSettings();
       
      Returns:
      true if the custom view includes settings for hidden rows and columns, including filter information; otherwise, false.
    • getPrintSettings

      boolean getPrintSettings()
      Gets a value indicating whether print settings are included in this custom view.

      This property reflects the printSettings option that was specified when the custom view was created.

      
       ICustomView customView = workbook.getCustomViews().add("PrintView", true, false);
       boolean includePrintSettings = customView.getPrintSettings();
       
      Returns:
      true if print settings are included in the custom view; otherwise, false.
    • show

      void show()
      Applies this custom view to all worksheets in the workbook.

      Use this method to switch the workbook to the state stored in this custom view, including the view settings captured when the custom view was created.

      
       ICustomView customView = workbook.getCustomViews().add("PrintView", true, false);
       customView.show();
       
    • delete

      void delete()
      Deletes this custom view from its parent ICustomViews collection.

      After this method is called, the custom view is removed from the workbook's custom view collection.

      
       ICustomView customView = workbook.getCustomViews().add("ReviewView", true, true);
       customView.delete();