Excel.AutoFillType enum

对工作簿中的区域使用自动填充时的行为类型。

注解

API 集:ExcelApi 1.9

使用方

示例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-auto-fill.yaml

await Excel.run(async (context) => {
  const sheet = context.workbook.worksheets.getActiveWorksheet();
  const sumCell = sheet.getRange("K4");

  // Copy only the formatting, not the values and formulas.
  sumCell.autoFill("K4:K7", Excel.AutoFillType.fillFormats);
  sumCell.format.autofitColumns();
  await context.sync();
});

字段

fillCopy = "FillCopy"

根据所选数据使用数据填充相邻单元格。

fillDays = "FillDays"

“FillSeries”的一个版本,用于日期,该模式基于月份中的某一天或一个星期中的某一天,具体取决于上下文。

fillDefault = "FillDefault"

根据周围的数据填充相邻单元格, (标准自动填充行为) 。

fillFormats = "FillFormats"

使用所选格式填充相邻单元格。

fillMonths = "FillMonths"

用于日期的“FillSeries”的一个版本,其模式基于月份。

fillSeries = "FillSeries"

使用遵循所复制单元格中的模式的数据填充相邻单元格。

fillValues = "FillValues"

使用所选值填充相邻的单元格。

fillWeekdays = "FillWeekdays"

“FillSeries”的一个版本,用于日期,该模式基于星期几,并且仅包括工作日。

fillYears = "FillYears"

用于基于年份模式的日期的“FillSeries”版本。

flashFill = "FlashFill"

使用 Excel 的快速填充功能填充相邻单元格。

growthTrend = "GrowthTrend"

用于根据增长趋势模型填充相邻单元格中值的数字的“FillSeries”版本。

linearTrend = "LinearTrend"

用于根据线性趋势模型填充相邻单元格中值的数字的“FillSeries”版本。