ExcelScript.ChartSeriesBy enum

系列が行別か列別かを指定します。 Excel on desktop では、"auto" オプションによってソース データ図形が検査され、データが行または列によって自動的に推測されます。 Excel on the webでは、"auto" は既定で "columns" になります。

注釈

/**
 * This script creates a clustered-column chart using an existing table.
 */
function main(workbook: ExcelScript.Workbook) {
    // Get the first table on the current worksheet.
    const sheet = workbook.getActiveWorksheet();
    const table = sheet.getTables()[0];

    // Add a clustered-column chart that clusters the data based on the columns in the table.
    const chart = sheet.addChart(
        ExcelScript.ChartType.columnClustered,
        table.getRange(),
        ExcelScript.ChartSeriesBy.columns
    );   
}

フィールド

auto

Excel on desktop では、"auto" オプションによってソース データ図形が検査され、データが行または列によって自動的に推測されます。 Excel on the webでは、"auto" は既定で "columns" になります。

columns
rows