您的位置:网站首页 > 找传奇私服 > 正文

.VC Excel chart

作者:桂林米果 来源:永远相爱 日期:2016-12-24 3:26:41 人气: 标签:

  book.SaveAs(COleVariant(_T("E:\\b.xls")),covOptional,covOptional,covOptional,covOptional,covOptional,1,covOptional,covOptional,covOptional,covOptional,covOptional);book.Close(covOptional,covOptional,covOptional);books.Close();

CApplication app;CWorkbooks books;CWorkbook book;CWorksheets sheets;CWorksheet sheet;CRange range;CFont0 font;CRange cols;int i = 3;CString str1, str2;long lRowCount;

COleVariantcovTrue((short)TRUE),covFalse((short)FALSE),covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);

CApplication app;CWorkbooks books;CWorkbook book;CWorksheets sheets;CWorksheet sheet;CRange range;CFont0 font;CRange cols;int i = 3;CString str1, str2;long lRowCount;

COleVariantcovTrue((short)TRUE),covFalse((short)FALSE),covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);

book.SaveAs(COleVariant(_T("E:\\b.xls")),covOptional,covOptional,covOptional,covOptional,covOptional,1,covOptional,covOptional,covOptional,covOptional,covOptional);book.Close(covOptional,covOptional,covOptional);books.Close();

if( !app.CreateDispatch(_T("Excel.Application"))){MessageBox(_T("chart

VC Excel chart

无法创建Excel应用!"));return;}app.put_Visible(TRUE);aVCpp.put_UserControl(TRUE);books=app.get_Workbooks();book=books.Add(COleVariant(_T("E:\\c.xls")));sheets=book.get_Sheets();sheet=sheets.get_Item(COleVariant((short)1));//range = sheet.get_Range(COleVariant(_T("A")),COleVariant(_T("A")));range = sheet.get_Range(COleVariant(_T("A1")),COleVariant(_T("A1")));range = range.get_End(xlDown);lRowCount = range.get_Row();str1.Format(_T("D%d"),lRowCount);range=sheet.get_Range(COleVariant(_T("A1")),COleVariant(str1));CChartObjects chartObjects;//chartObjects.AttachDispatch(sheet.ChartObjects(covOptional));chartObjects = sheet.ChartObjects(covOptional);CChartObject myChart = chartObjects.Add(120, 40, 400, 250);CChart chart=myChart.get_Chart();chart.put_ChartType(xlColumnClustered);chart.SetSourceData(range,COleVariant((long)xlColumns));chart.ApplyDataLabels(0,covOptional,covOptional,covOptional,covOptional,covOptional,covTrue,covOptional,covOptional,covOptional);chart.put_HasTitle(TRUE);CChartTitle chartTitle = chart.get_ChartTitle();chartTitle.put_Text(_T("sf999
新开传奇合击版本网站,我要忘掉那些令我不开心的事
新开传奇合击版本网站,我要忘掉那些令我不开心的事
对于中变传奇手游发布网站图表制作示例"));font = chartTitle.get_Font();font.put_Size(COleVariant((long)20));font.put_ColorIndex(COleVariant((long)3));font.put_Name(COleVariant(_T("华文新魏")));CChartArea chartArea = chart.get_ChartArea();Cnterior interior = chartArea.get_Interior();interior.put_ColorIndex(COleVariant((long)8));interior.put_PatternColorIndex(COleVariant((long)1));interior.put_Pattern(COleVariant((long)xlSolid));CPlotArea plotArea = chart.get_PlotArea();interior = plotArea.get_Interior();interior.put_ColorIndex(COleVariant((long)35));interior.put_PatternColorIndex(COleVariant((long)1));interior.put_Pattern(COleVariant((long)xlSolid));CSeries series = chart.SeriesCollection(COleVariant((long)1));CDataLabels dataLabels = series.DataLabels(covOptional);dataLabels.Delete();series = chart.SeriesCollection(COleVariant((long)2));dataLabels = series.DataLabels(covOptional);font = dataLabels.get_Font();font.put_Size(COleVariant((long)10));font.put_ColorIndex(COleVariant((long)5));

if( !app.CreateDispatch(_T("Excel.Application"))){MessageBox(_T("www无法创建Excel应用!"));return;}app.put_Visible(TRUE);app.put_UserControl(TRUE);books=app.get_Workbooks();book=books.Add(COleVariant(_T("E:\\c.xls")));sheets=book.get_Sheets();sheet=sheets.get_Item(COleVariant((short)1));//range = sheet.get_Range(COleVariant(_T("A")),COleVariant(_T("A")));range = sheet.get_Range(COleVariant(_T("A1")),COleVariant(_T("A1")));range = range.get_End(xlDown);lRowCount = range.get_Row();str1.Format(_T("D%d"),lRowCount);range=sheet.get_Range(COleVariant(_T("A1")),COleVariant(str1));CChartObjects chartObjects;//chartObjects.AttachDispatch(sheet.ChartObjects(covOptional));chartObjects = sheet.ChartObjects(covOptional);CChartObject myChart = chartObjects.Add(120, 40, 400, 250);CChart chart=myChart.get_Chart();chart.put_ChartType(xlColumnClustered);chart.SetSourceData(range,COleVariant((long)xlColumns));chart.ApplyDataLabels(0,covOptional,covOptional,covOptional,covOptional,covOptional,covTrue,covOptional,covOptional,covOptional);chart.put_HasTitle(TRUE);CChartTitle chartTitle = chart.get_ChartTitle();chartTitle.put_Text(_T("开传奇需要什么技术图表制作示例"));font = chartTitle.get_Font();font.put_Size(COleVariant((long)20));font.put_ColorIndex(COleVariant((long)3));font.put_Name(COleVariant(_T("zhosf999华文新魏")));CChartArea chartArea = chart.get_ChartArea();Cnterior interior = chartArea.get_Interior();interior.put_ColorIndex(COleVariant((long)8));interior.put_.vclorIndex(COleVariant((long)1));interior.put_Pattern(COleVariant((long)xlSolid));CPlotArea plotArea = chart.get_PlotArea();interior = plotArea.get_Interior();interior.put_ColorIndex(COleVariant((long)35));interior.put_PatternColorIndex(COleVariant((long)1));i找传奇网站nterior.put_Pattern(COleVariant((long)xlSolid));CSeries series = chart.SeriesCollection(COleVaria我不知道VCnt((long)1));CDataLabels dataLabels = series.DataLabels(covOptional);dataLabels.Delete();series = chart.SeriesCollection(COleVariant((long)2));dataLabels = series.Da对比一下comtaLabels(covOptional);font = dataLabels.get_Font();font.put_Size(COleVariant((long)10));font.put_ColorIndex(COleVariant((long)5));


超级变态网页传奇你看chart
学会vc
com
sf123网站
你看zhaosf
你知道www
chart
找传奇网站有哪些
谁有好的传奇网站
excel
zhaosf
听听火光游戏发布网
听听新开传奇网站中变
sf123网站
手游私sf无限元宝
Excel你知道中变合击传奇网站
com
我不知道Excel
相比看zhaosf
www
读完这篇文章后,您心情如何?
0
0
0
0
0
0
0
0
本文网址: