09-05-2017 07:51 AM
Hi
I'd like to use the ActiveX to plot the data in the EXCEL.
With the help of this thread: https://forums.ni.com/t5/LabVIEW/How-do-I-plot-multiple-series-in-Excel/td-p/106580?query.id=1860717
I can make it for simple case.
But my data is not in a row, say I have to plot the cells "A1", "A6", "A11", "A16", ....
As a result, I modify that code it works if the element number is less than 40s, but some error happened when the number exceeds 40s.
Is there any workaround to deal with this problem?
Solved! Go to Solution.
09-05-2017 07:59 AM
Hi William,
but some error happened when the number exceeds 40s.
How does your "number" exceed a time of 40s?
On your image:
When you want to select a range of "AA1:AD90" then why don't you give just this range string? Why do you need to select all cells individually by their label like "AA1,AA2,AA3,AA4,…"?
09-05-2017 08:17 AM
Hi GerdW,
Thanks for your prompt reply.
I didn't make the description clear, sorry for my poor English.
There is a Element Number in a red dashed circle in the following image.
If I set the Element Number to 30, it works fine, but if I set it to 90, it fails.
The range of AA1:AD90 is just for easy to test, in the real case, my range of interest is like A1, A6, A11, A16, A21...(first series); D1, D3, D5, D7, ...(second series); ...
09-05-2017 08:24 AM - edited 09-05-2017 08:25 AM
Hi William,
If I set the Element Number to 30, it works fine, but if I set it to 90, it fails.
To create a range string of 30 elements takes 30*2+9*1+21*2 + 30*1 = 141 chars.
For 90 cells you need 90*2+9*1+81*2+90*1 = 441 chars: maybe Excel doesn't accept such long strings over its ActiveX interface?
my range of interest is like A1, A6, A11, A16, A21...(first series); D1, D3, D5, D7, ...(second series); ...
When you know the reference of the chart you could add the plots one by one. This way you can use the full range string for just one plot.
Wouldn't it be much easier to collect all needed data on an additional sheet and then create the chart using a simple range like "A1: D99"???
09-19-2017 01:27 AM
GerdW 已寫:
Hi William,
If I set the Element Number to 30, it works fine, but if I set it to 90, it fails.
To create a range string of 30 elements takes 30*2+9*1+21*2 + 30*1 = 141 chars.
For 90 cells you need 90*2+9*1+81*2+90*1 = 441 chars: maybe Excel doesn't accept such long strings over its ActiveX interface?
my range of interest is like A1, A6, A11, A16, A21...(first series); D1, D3, D5, D7, ...(second series); ...
When you know the reference of the chart you could add the plots one by one. This way you can use the full range string for just one plot.
Wouldn't it be much easier to collect all needed data on an additional sheet and then create the chart using a simple range like "A1: D99"???
Yes, I collect all data of interest on an additional sheet to create charts by simple ranges, like "A1:A10", without getting any better way recently.
Thanks to your friendly suggestion 🙂