Home > Software engineering >  VC use EXCEL export custom charts
VC use EXCEL export custom charts

Time:10-29

VC, EXCEL export custom charts, custom chart to set the X value and generate each curve color

To watch is similar to the following
 if (! HExcel. OpenBook (CA2W (strFileName c_str ()))) {
CLog: : Instance () - & gt; LOG_WriteLine (LOG_INFO_ERROR,
"% s: failed to open the file (% s)",
__FUNCTION__, strFileName c_str ());
return false;
}

PWorkBook=hExcel. GetWorkBook ();

If (hExcel. SetActiveSheet (L "Cycle")) {
PSheet=hExcel. GetActiveSheet ();
}
Excel: : RangePtr RangeCell=pSheet - & gt; Cells;
//pSheet - & gt; Range [" A3 "] "E13" [L];
Const int nplot=100;
Const double xlow=0.0, xhigh=20.0;
Double h=(xhigh - xlow)/(double) nplot;
_ChartPtr pChart=hExcel. GetWorkBook () - & gt; Charts - & gt; The Add ();
PChart - & gt; ChartWizard (
(Excel: : Range *) RangeCell,
(long) Excel: : xlXYScatter,
6 l,
(long) Excel: : xlColumns,
1 l, 1 l,
True,
L "My Graph,"
L "x," L "f (x)");
PChart - & gt; Name=L "My Data Plot";
HExcel. The Save ();
HExcel. Close ();

This wizard generated to reach what I want

CodePudding user response:

Found a practical example of

http://blog.csdn.net/bwmwm/article/details/3200553

CodePudding user response:

Suggest the original poster check third-party libraries

CodePudding user response:

What effect you want, it look at first
  • Related