02-08-2017 03:00 PM
Does anyone have experience doing advanced plotting on an excel chart? I tried to add a shape using Excel_ShapesAddShape, but couldn't make it work. Where can I find such examples? Thank you.
Solved! Go to Solution.
02-08-2017 03:05 PM
Have a look at this:
http://www.ni.com/tutorial/5835/en/
In particularly the 'Adding a Graph' section.
02-09-2017 08:29 AM
Thanks for the reply, Daniel. The tutorial is for basic excel functions that uses excelreport.fp. For advanced excel graphing such as adding shapes/textboxes, I think functions in excel2000.h are needed.
Here is an example: plot a line in a chart. But the line doesn't show up. Do I miss any other functions to define or set attribute of the line (shapeHandle)?
Excel_ShapesAddLine (chartHandle, NULL, 100, 100, 100, 100, &shapeHandle);
Thanks a lot.
02-10-2017 01:59 PM
This forum post is related:
http://forums.ni.com/ni/board/crawl_message?board.id=180&message.id=47510
and mentions writing a VBA script that will draw the shape to call in CVI:
https://msdn.microsoft.com/en-us/library/aa221611(office.11).aspx
This forum post is also related and seems helpful
http://forums.ni.com/ni/board/crawl_message?board.id=180&message.id=52934
02-10-2017 04:17 PM
The last link is very helpful. I get it. Thanks a lot, Maggie!