Excel.AutoFillType enum

The behavior types when AutoFill is used on a range in the workbook.

Remarks

[ API set: ExcelApi 1.9 ]

Examples

// 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();
});

Fields

fillCopy = "FillCopy"

Populates the adjacent cells with data based on the selected data.

fillDays = "FillDays"

A version of "FillSeries" for dates that bases the pattern on either the day of the month or the day of the week, depending on the context.

fillDefault = "FillDefault"

Populates the adjacent cells based on the surrounding data (the standard AutoFill behavior).

fillFormats = "FillFormats"

Populates the adjacent cells with the selected formats.

fillMonths = "FillMonths"

A version of "FillSeries" for dates that bases the pattern on the month.

fillSeries = "FillSeries"

Populates the adjacent cells with data that follows a pattern in the copied cells.

fillValues = "FillValues"

Populates the adjacent cells with the selected values.

fillWeekdays = "FillWeekdays"

A version of "FillSeries" for dates that bases the pattern on the day of the week and only includes weekdays.

fillYears = "FillYears"

A version of "FillSeries" for dates that bases the pattern on the year.

flashFill = "FlashFill"

Populates the adjacent cells by using Excel's Flash Fill feature.

growthTrend = "GrowthTrend"

A version of "FillSeries" for numbers that fills out the values in the adjacent cells according to a growth trend model.

linearTrend = "LinearTrend"

A version of "FillSeries" for numbers that fills out the values in the adjacent cells according to a linear trend model.