Excel add-in using JavaScript API - how to get chart series source? RRS feed

  • Question

  • I am writing an Excel add-in using MS Office JavaScript API

    One of the tasks is to store charts in cloud and recreate them later. For creating a chart, the only function that the API is providing is

    var chart = ctx.workbook.worksheets.getItem(sheetName).charts.add("pie", sourceData, "auto");

    where sourceData must be am Excel range in A1:B2 format.

    Unfortunately, when we iterate through all the charts in the sheet, the series object only contains values, no reference to the range is provided.

    In the original VBA Excel model , the Series class had an additional Formula property, that is missing from the JS implementation.

    Do you have any idea how to solve that ? How to get the series range for a chart ?

    Tuesday, February 2, 2016 8:18 AM


  • Hi Paul,

    Based on check the object related to chart object, there is the property/object/function to get the source range of the chart.

    I suggest that you could submit the user voice here, after that you may post the link here which is benefit others who has the similar issue.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 3, 2016 6:24 AM