ExcelScript.ChartSeriesBy enum
指定序列是按行还是按列。 在桌面版 Excel 中,“自动”选项将检查源数据形状,以自动猜测数据是按行还是按列。 在Excel 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 中,“自动”选项将检查源数据形状,以自动猜测数据是按行还是按列。 在Excel web 版中,“auto”将仅默认为“columns”。 |
columns | |
rows |