我正在尝试创建一个简单电子表格的图形表示,但我收到一条错误消息,提示“没有对象类型与列类型匹配”。
function doGet() {
var ss = SpreadsheetApp.openById("xyz");
var data = ss.getDataRange();
var segFilter = Charts.newStringFilter().setFilterColumnIndex(6).build();
var execFilter = Charts.newCategoryFilter().setFilterColumnIndex(7).build();
var tableChart = Charts.newTableChart()
.setDataViewDefinition(Charts.newDataViewDefinition().setColumns([1,2,3,4,5,6,7,8,9,10,11,12,13]))
.build();
var dashboard = Charts.newDashboardPanel().setDataTable(data)
.bind([segFilter, execFilter], [tableChart])
.build();
var app = UiApp.createApplication();
var filterPanel = app.createVerticalPanel();
var chartPanel = app.createHorizontalPanel();
filterPanel.add(segFilter).add(execFilter).setSpacing(10);
chartPanel.add(tableChart).setSpacing(10);
dashboard.add(app.createVerticalPanel().add(filterPanel).add(chartPanel));
app.add(dashboard);
return app;
}
我怎样才能解决这个问题?