[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

PrintLocation

Enum Class PrintLocation

java.lang.Object
java.lang.Enum<PrintLocation>
com.grapecity.documents.excel.PrintLocation
All Implemented Interfaces:
Serializable, Comparable<PrintLocation>, Constable

public enum PrintLocation extends Enum<PrintLocation>
表示注释随工作表一起打印的方式。

将此枚举与 IPageSetup.setPrintComments(PrintLocation) 一起使用,可以控制工作表注释是否从打印输出中省略、作为尾注打印,或在其原始位置打印。


 worksheet.getRange("A1").addComment("Review this value.");
 worksheet.getPageSetup().setPrintComments(PrintLocation.SheetEnd);
 PrintLocation printLocation = worksheet.getPageSetup().getPrintComments();
 
  • Enum Constant Details

    • NoComments

      public static final PrintLocation NoComments
      不打印批注。
    • SheetEnd

      public static final PrintLocation SheetEnd
      批注打印为工作表末尾的尾注。
    • InPlace

      public static final PrintLocation InPlace
      注释将打印在工作表上插入的位置。
  • Method Details

    • values

      public static PrintLocation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PrintLocation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Gets the integer value of this enum member.
      Returns:
      The zero-based integer value of this enum member.
    • forValue

      public static PrintLocation forValue(int value)
      Gets the enum member for the specified integer value.
      Parameters:
      value - The zero-based integer value.
      Returns:
      The matching PrintLocation member.