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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -