Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel won't 'listen'
Message
From
08/08/2003 03:41:30
Geert Van Snik
Zorgned Automatisering Bv
Wageningen, Netherlands
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel won't 'listen'
Miscellaneous
Thread ID:
00818096
Message ID:
00818096
Views:
55
LS,

Our application needs to spew management information and we export it to Excel to make lists and graphs. This has worked flawless until now.
What happens is that I use the following two lines to set the source for the graph (everything in the list is just fine)

oChart.chart.SeriesCollection.Add(oWorkSheet_Cijf.Range("C5:F" + lcTotalLine), 2, .T.)

oChart.chart.SeriesCollection.Add(oWorkSheet_Cijf.Range("A5:A" + lcTotalLine), 2, .F., .T., .T.)

Where C5:Fx hold the numbers and A5:Ax hold the (horizontal)labels.
This used to be just fine, but after some work on the code (actually the SQLs that generate the data) something goes wrong.
The content of the list(oWorkSheet_Cijf) is still oke, but when asking for the sourcedata of the graph it tells me it's looking at the range D5:Fx and A5:Ax. Therefor the graph is missing data.

What gives? I can correct the problem by setting the range to B5:Fx, that gives a graph range of C5:Fx, but that doesn't add up. It's plain ugly and not maintainable.

What made Excel 'decide' to change my ranges, and how do I get it back on track?

Any help is greatly appreciated.

Update: I've found that the problem arises when there's only one row. That is, one row of data. In practice this still comes down to 3 rows. One for the labels, one with 'real' data plus one with totals. It seems when the selection is smaller that 4 rows the problem appears. Anyone ever seen this behaviour. I get the feeling it's a bug in the automation, any known workarounds?
Next
Reply
Map
View

Click here to load this message in the networking platform