Excel add-in using JavaScript API - how to get chart series source? -
i writing excel add-in using ms office javascript api
one of tasks store charts in cloud , recreate them later. creating chart, function api providing
var chart = ctx.workbook.worksheets.getitem(sheetname).charts.add("pie", sourcedata, "auto");
where sourcedata must excel range in a1:b2 format.
unfortunately, when iterate through charts in sheet, series object contains values, no reference range provided.
in original vba excel model , series class had additional formula property, missing js implementation.
do have idea how solve ? how series range chart ?
maybe provide 'sourcedata' range follows.
var sheet = ctx.workbook.worksheets.getactiveworksheet(); var sourcedata = sheet.getrange("a1:b6"); var chart = ctx.workbook.worksheets.getitem(sheetname).charts.add("pie", sourcedata, "auto");
placing directly string "a1:b6" not seem work.
Comments
Post a Comment