How do I change the colour of data points in a C++ generated Excel chart?


I am in the midst of creating a project in C++ where I have to display some of my results on an excel chart. I have learned how to create all the charts that I need, but there's one thing I have not been able to find out how to do?

I have created a scatter chart but I need to know how to change the colours of the scatter points. This is the part of the code that generates my scatter chart:



Excel::_ChartPtr pChart = pXL->ActiveWorkbook->Charts->Add();

pChart->ChartWizard((Excel::Range*)pTotalRange, (long)Excel::xlXYScatter, 1L, (long)Excel::xlColumns, 1L, 1L, true, "Scatter graph", col1.c_str(), col2.c_str());



To get Excel functionality, I use import commands to access the MSO.DLL / VBE6EXT.OLB / EXCEL.EXE files.

I have read around extensively and although I have seen examples of how to change colors in other languages. I have cycled through a variety of C++ commands and cannot find the corresponding command.

I would be immensely grateful for any help as to how to change the colors of data points otherwise my chart will not serve its purpose.
Topic archived. No new replies allowed.