Call Excel cell contents for series name using ActiveX
3 views (last 30 days)
Show older comments
I am attempting to create a multi-series chart in Excel using the MATLAB ActiveX feature and I have almost all of it, except for being able to name the series. The difficulty with this is that I am attempting to automate the selection process by getting MATLAB to reference some of the Excel cells for the name choice.
More specifically I have having issues with the incompatibility of the naming command, which requires a string input, and the calling reference, which results an interface handle.
xlsheet = Excel.ActiveSheet;
xlchart = xlsheet.ChartObjects.Add();
% Series name calling line
name = xlsheet.Range('C2');
% Series name declaration line
xlchart.Chart.SeriesCollecition(1).Name = name;
0 Comments
Answers (1)
See Also
Categories
Find more on ActiveX in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!