[]
Serializable, Comparable<InsufficientSpaceHandling>, Constable将此枚举与 DataImportOptions.setInsufficientSpaceHandling(InsufficientSpaceHandling)配合使用,可以控制当目标区域无法容纳完整导入内容时,传入数据是覆盖现有单元格、插入单元格腾出空间,还是被截断。默认行为为 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.EnumDesc<E extends Enum<E>>static InsufficientSpaceHandlingstatic InsufficientSpaceHandling[]values()name - the name of the enum constant to be returned.IllegalArgumentException - if this enum class has no constant with the specified nameNullPointerException - if the argument is null