Hi friends, does anybody know how to create a new chart in a excel worksheet using ActiveX? I've messed around, but can't manage to do that, any examples? (LV 5.0 please) Thanks in advance
I am using Office 2000 (Microsoft Excel 9.0 Object Library Version 1.3). If this isn't exactly what you have it should give you an idea of where to look.
Once you have a valid reference to a workbook you can use that reference to "Charts". Wire the reference from that property to an "Invoke Node" and select the "Add" method. You don't have to wire any of the inputs for this node. The output from the "Add" needs to be casted to an Excel._Chart type. From there you can setup the chart.
I am attaching a LLB with the code to do all of this. It's compiled in LV 6.1 and is using Office 2000.
Hope this helps someone out! I have had some good experience with working with Excel through ActiveX so if you have any further questions feel free to ask.