[]
        
(Showing Draft Content)

InsufficientSpaceHandling

Enum Class InsufficientSpaceHandling

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

public enum InsufficientSpaceHandling extends Enum<InsufficientSpaceHandling>
Specifies how GcExcel handles insufficient destination space when importing data into a range.

Use this enum with DataImportOptions.setInsufficientSpaceHandling(InsufficientSpaceHandling) to control whether incoming data overwrites existing cells, inserts cells to make room, or is truncated when the target range cannot accommodate the full import. The default behavior is Overwrite.


 worksheet.getRange("A5").setValue("Existing data");
 DataImportOptions options = new DataImportOptions();
 options.setInsufficientSpaceHandling(InsufficientSpaceHandling.InsertCells);
 worksheet.getRange("A1:A4").importData(new double[] {1.0, 2.0, 3.0, 4.0, 5.0}, options);
 
  • Enum Constant Details

  • Method Details

    • values

      public static InsufficientSpaceHandling[] 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 InsufficientSpaceHandling 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