Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2515
JavaScript Excel - How to specify spaces in dataSource worksheet name
posted

I have a worksheet called "My Sheet" with data I want to use as the datasource for a chart.

If I code chart.setSourceData('My Sheet!A1:M9',true) or char.setSourceData("'My Sheet'!A1:M9,true), I get an error. The only way to get it to work is to remove all spaces from the worksheet name, but I want the worksheet name to have some spaces to make it more readable.

Even though the worksheet name can also include other characters, like a dash or comma, having those in the specified worksheet name when calling the setSourceData method causes errors.

How can I use data from a worksheet in the setSourceData method when the worksheet name contains blanks and other allowed characters?

Parents
No Data
Reply
  • 16310
    Offline posted

    Hi Ray,

    I tried creating a sample for that and I am getting 'Invalid region name' using this syntax. At the same time, I was able to set data source from the same same sheet. If you are able to send an isolated sample reproducing the issue, I will be able to investigate it immediately for you.

    Most probably this is a bug that will then needs to be logged in our system and investigated further.

    Hristo

Children