C# webfrom Excel图形对象(Excel chart对象)生成图片

如题,c#如何将excel文件保存为图片文件?
回复讨论(解决方案)
这里面提供的答案有几个思路:
1、使用现成的控件来实现。
2、间接思路。
从excel先转成pdf,然后再读取pdf里面的图片。
这里面提供的答案有几个思路:
1、使用现成的控件来实现。
2、间接思路。
从excel先转成pdf,然后再读取pdf里面的图片。
谢谢您提供的思路,您给的网站注册后激活的邮件好像不能发到邮箱,间接思路,我的表格比较宽,转成pdf的话会被截成两半,请您再帮忙点拨点拨。谢谢!
我的excel表格是不固定的,下面是我表格的一种
有人帮忙解决下吗?
很好解决的,你用一个picturebox放入excel文件的打印预览,然后picturebox.Image.Save(),就好了。
预览本就是图片了,呵呵。
对了,你可以将纸张高度根据实际内容来设,保证在一张图里就行。
思路给了,没几行代码,自己不会的地方再到网上搜索一下就行。
很好解决的,你用一个picturebox放入excel文件的打印预览,然后picturebox.Image.Save(),就好了。
预览本就是图片了,呵呵。
对了,你可以将纸张高度根据实际内容来设,保证在一张图里就行。
思路给了,没几行代码,自己不会的地方再到网上搜索一下就行。
感谢您,但是我需要用web程序来完成,看是否有别的解决方法?
也很简单的啊,下载一个Aspose.Cells引用一下,都是破解的,功能强大,我用他主要是不想写太多代码,我在asp.net里操作excel也是用这个。生成图片:
Workbook&book&=&newWorkbook(&d:\\Book1.xls&);
//创建一个图表选项的对象
ImageOrPrintOptions&imgOptions&=&newImageOrPrintOptions();
//设置图片类型
imgOptions.setImageFormat(ImageFormat.getPng());
//获取第一张工作表
Worksheet&sheet&=&book.getWorksheets().get(0);
//创建一个纸张底色渲染对象
SheetRender&sr&=&new&SheetRender(sheet,&imgOptions);
for&(int&j&=&0;&j&&&sr.getPageCount();&j&)
//将工作表转为图片
sr.toImage(j,&&d:\\files\\mysheetimg_&&j&&.png&);
是可以将工作表转换为BMP、PNG、JPEG、TIFF和EMF等图片格式的,你自己试试就知道了。
也很简单的啊,下载一个Aspose.Cells引用一下,都是破解的,功能强大,我用他主要是不想写太多代码,我在asp.net里操作excel也是用这个。生成图片:
Workbook&book&=&newWorkbook(&d:\\Book1.xls&);
//创建一个图表选项的对象
ImageOrPrintOptions&imgOptions&=&newImageOrPrintOptions();
//设置图片类型
imgOptions.setImageFormat(ImageFormat.getPng());
//获取第一张工作表
Worksheet&sheet&=&book.getWorksheets().get(0);
//创建一个纸张底色渲染对象
SheetRender&sr&=&new&SheetRender(sheet,&imgOptions);
for&(int&j&=&0;&j&&&sr.getPageCount();&j&)
//将工作表转为图片
sr.toImage(j,&&d:\\files\\mysheetimg_&&j&&.png&);
十分感谢您!
我下载了一个Aspose.Cells.dll引用了,但是里面好像有的方法是不存在的,请您指教下!
已替你测试通过
using&Aspose.C
using&Aspose.Cells.R
public&void&ExcelToImg()
Workbook&book&=&new&Workbook(@&f:\book.xlsx&);
Worksheet&sheet&=&book.Worksheets[0];
sheet.PageSetup.LeftMargin&=&0;
sheet.PageSetup.RightMargin&=&0;
sheet.PageSetup.BottomMargin&=&0;
sheet.PageSetup.TopMargin&=&0;
ImageOrPrintOptions&imgOptions&=&new&ImageOrPrintOptions();
imgOptions.ImageFormat&=&System.Drawing.Imaging.ImageFormat.J
imgOptions.OnePagePerSheet&=&
imgOptions.PrintingPage&=&PrintingPageType.IgnoreB
SheetRender&sr&=&new&SheetRender(sheet,&imgOptions);
sr.ToImage(0,&&f:\\book.jpg&);
已替你测试通过
using&Aspose.C
using&Aspose.Cells.R
public&void&ExcelToImg()
Workbook&book&=&new&Workbook(@&f:\book.xlsx&);
Worksheet&sheet&=&book.Worksheets[0];
sheet.PageSetup.LeftMargin&=&0;
sheet.PageSetup.RightMargin&=&0;
sheet.PageSetup.BottomMargin&=&0;
sheet.PageSetup.TopMargin&=&0;
ImageOrPrintOptions&imgOptions&=&new&ImageOrPrintOptions();
imgOptions.ImageFormat&=&System.Drawing.Imaging.ImageFormat.J
imgOptions.OnePagePerSheet&=&
imgOptions.PrintingPage&=&PrintingPageType.IgnoreB
SheetRender&sr&=&new&SheetRender(sheet,&imgOptions);
sr.ToImage(0,&&f:\\book.jpg&);
成功了!感激不尽!查看: 2435|回复: 4
求助:如何用C#编程读取excel图表在图片框中显示,图表作为单独的Chart存在
该用户从未签到
如何用C#编程读取excel图表在图片框中显示,图表作为单独的Chart存在
TA的每日心情开心3&小时前签到天数: 113 天[LV.6]常住居民II
图表在excel中是表格数据,你直接读取,然后再生成把,和读取数据库数据一样的
该用户从未签到
能否给出实现代码,比如 excel图表名称为“chart1”
该用户从未签到
能否给出实现代码,比如 excel图表名称为“chart1”
站长的意思是让你把图标从表格上生成,这样方便读取,
该用户从未签到
本人菜鸟。是别的系统已经生成excel的各个Sheet以及单独的Chart1、Chart2,现在要做一个小应用,把其中的chart2读出,显示在图片框中。sheet表数据可以读出显示在DataGridView中,,但是不知道怎么显示Chart。。。。
( 豫ICP备号-1)&&&&&&&&&&&&&
有两种实现方式,一种是利用OWC11组件完成,一种运用Excel完成!
&&&&&&&&& 运用OWC11的完成,适合生成一个图形文件,之后不能不在文件中编辑;运用Excel则更适合利用EXCEL文件中的数据直接在文件中加入图表,方便以后编辑!两种我都尝试了,由于我更适合于使用第二种,所以我开发的较完善。在这里公布源码供大家参考使用!
说明,在窗口,添加一个按钮,名称为Btn,我只写代码部分(我的数据中是日期对应的两种数据,如下表)
在EXCEL文档中生成如下数据(部分),在数据右侧根据数据生成图表
基金净值指数图表
日期 开放式基金 偏股型基金
添加以下引用:using System.IO;using System.Runtime.InteropSusing Excel = Microsoft.Office.Interop.E
private void Btn_Click(object sender, EventArgs e){
&&&&&&& //创建一个EXCEL文档
&&&&&&& CreateExcel("标题","文档.XLS", "工作表名");
private void CreateExcel(string title,& string fileName, string sheetNames){&&&&&&&&&&& //待生成的文件名称&&&&&&&&&&& string FileName = fileN&&&&&&&&&&& string FilePath = strCurrentPath + FileN
&&&&&&&&&&& FileInfo fi = new FileInfo(FilePath);&&&&&&&&&&& if (fi.Exists)&&&& //判断文件是否已经存在,如果存在就删除!&&&&&&&&&&& {&&&&&&&&&&&&&&& fi.Delete();&&&&&&&&&&& }&&&&&&&&&&& if (sheetNames != null && sheetNames != "")&&&&&&&&&&& {&&&&&&&&&&&&&&& Excel.Application m_Excel = new Excel.Application();//创建一个Excel对象(同时启动EXCEL.EXE进程) &&&&&&&&&&&&&&& m_Excel.SheetsInNewWorkbook = 1;//工作表的个数 &&&&&&&&&&&&&&& Excel._Workbook m_Book = (Excel._Workbook)(m_Excel.Workbooks.Add(Missing.Value));//添加新工作簿 &&&&&&&&&&&&&&& Excel._Worksheet m_S&
&&&&&&&&&&&&&&& #region 处理
&&&&&&&&&&&&&&& DataSet ds= ScData.ListData("exec Vote_2008.dbo.P_VoteResult_Update " + int.Parse(fdate));&&&&&&&&&&&&&&& if (ds.Tables.Count&= 0)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&& MessageBox.Show("没有最新数据!");&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&& DataTableToSheet(title,& ds.Tables[0], m_Sheet, m_Book, 0);&&&&&&&&&&&&&&& #endregion
&&&&&&&&&&&&&&& #region 保存Excel,清除进程&&&&&&&&&&&&&&& m_Book.SaveAs(FilePath, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,&& Excel.XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);&&&&&&&&&&&&&&& //m_Excel.ActiveWorkbook._SaveAs(FilePath, Excel.XlFileFormat.xlExcel9795, null, null, false, false, Excel.XlSaveAsAccessMode.xlNoChange, null, null, null, null, null);&&&&&&&&&&&&&&& m_Book.Close(false, Missing.Value, Missing.Value);&&&&&&&&&&&&&&& m_Excel.Quit();&&&&&&&&&&&&&&& System.Runtime.InteropServices.Marshal.ReleaseComObject(m_Book);&&&&&&&&&&&&&&& System.Runtime.InteropServices.Marshal.ReleaseComObject(m_Excel);
&&&&&&&&&&&&&&& m_Book =&&&&&&&&&&&&&&& m_Sheet =&&&&&&&&&&&&&&& m_Excel =&&&&&&&&&&&&&&& GC.Collect();&&&&&&&&&&&&&&& //this.Close();//关闭窗体
&&&&&&&&&&&&&&& #endregion&&&&&&&&&&& }&& }
&&&&&&& #region 将DataTable中的数据写到Excel的指定Sheet中&&&&&&& /// &summary&&&&&&&& /// 将DataTable中的数据写到Excel的指定Sheet中&&&&&&& /// &/summary&&&&&&&& /// &param name="dt"&&/param&&&&&&&& /// &param name="m_Sheet"&&/param&&&&&&&& public void DataTableToSheet(string title, DataTable dt, Excel._Worksheet m_Sheet,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& Excel._Workbook m_Book,&& int startrow)&&&&&&& {
&&&&&&&&&&& //以下是填写EXCEL中数据&&&&&&&&&&& Excel.Range range = m_Sheet.get_Range(m_Sheet.Cells[1, 1], m_Sheet.Cells[1, 2]);&&&&&&&&&&& range.MergeCells =& //合并单元格&&&&&&&&&&& range.Font.Bold =&& //加粗单元格内字符&&&&&&&&&&& //写入题目&&&&&&&&&&& m_Sheet.Cells[startrow, startrow] =&&&&&&&&&&& int rownum = dt.Rows.C//行数&&&&&&&&&&& int columnnum = dt.Columns.C//列数&&&&&&&&&&& int num = rownum + 2;&& //得到数据中的最大行数
&&&&&&&&&&& //写入列标题&&&&&&&&&&& for (int j = 0; j & j++)&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& int bt_startrow = startrow + 1;
&&&&&&&&&&&&&&&&&&& //将字段名写入文档&&&&&&&&&&&&&&&&&&& m_Sheet.Cells[bt_startrow, 1 + j] = dt.Columns[j].ColumnN
&&&&&&&&&&&&&&&&&&&& //单元格内背景色&&&&&&&&&&&&&&&&&&& m_Sheet.get_Range(m_Sheet.Cells[bt_startrow, 1 + j], m_Sheet.Cells[bt_startrow, 1 + j]).Interior.ColorIndex = 15;&&&&&&&&&&&& }&&&&&&&&&&
&&&&&&&&&&& //逐行写入数据 &&&&&&&&&&& for (int i = 0; i & i++)&&&&&&&&&&& {&&&&&&&&&&&&&&& for (int j = 0; j & j++)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&& m_Sheet.Cells[startrow + 2 + i, 1 + j] = dt.Rows[i][j].ToString();&&&&&&&&&&&&&&& }&&&&&&&&&&& }&&&&&&&&&&& m_Sheet.Columns.AutoFit();
&&&&&&&&&&&
&&&&&&&&& //在当前工作表中根据数据生成图表
&&&&&&&&&& CreateChart(m_Book, m_Sheet, num);& &&&&&&& }
&&&&&& private void CreateChart(Excel._Workbook m_Book,Excel._Worksheet m_Sheet,int num)&&&&&&& {&&&&&&&&&&& Excel.Range oResizeR&&&&&&&&&&& Excel.Series oS
&&&&&&&&&&& m_Book.Charts.Add(Missing.Value, Missing.Value, 1, Missing.Value);&&&&&&&&&&& m_Book.ActiveChart.ChartType = Excel.XlChartType.xlL//设置图形
&&&&&&&&&&& //设置数据取值范围&&&&&&&&&&& m_Book.ActiveChart.SetSourceData(m_Sheet.get_Range("A2", "C" + num.ToString()), Excel.XlRowCol.xlColumns);&&&&&&&&&&& //m_Book.ActiveChart.Location(Excel.XlChartLocation.xlLocationAutomatic, title);&&&&&&&&&&& //以下是给图表放在指定位置&&&&&&&&&&& m_Book.ActiveChart.Location(Excel.XlChartLocation.xlLocationAsObject, m_Sheet.Name);&&&&&&&&&&& oResizeRange = (Excel.Range)m_Sheet.Rows.get_Item(10, Missing.Value);&&&&&&&&&&& m_Sheet.Shapes.Item("Chart 1").Top = (float)(double)oResizeRange.T& //调图表的位置上边距&&&&&&&&&&& oResizeRange = (Excel.Range)m_Sheet.Columns.get_Item(6, Missing.Value);& //调图表的位置左边距&&&&&&&&&& // m_Sheet.Shapes.Item("Chart 1").Left = (float)(double)oResizeRange.L&&&&&&&&&&& m_Sheet.Shapes.Item("Chart 1").Width = 400;&& //调图表的宽度&&&&&&&&&&& m_Sheet.Shapes.Item("Chart 1").Height = 250;& //调图表的高度
&&&&&&&&&&& m_Book.ActiveChart.PlotArea.Interior.ColorIndex = 19;& //设置绘图区的背景色 &&&&&&&&&&& m_Book.ActiveChart.PlotArea.Border.LineStyle = Excel.XlLineStyle.xlLineStyleN//设置绘图区边框线条&&&&&&&&&&& m_Book.ActiveChart.PlotArea.Width = 400;&& //设置绘图区宽度&&&&&&&&&&& //m_Book.ActiveChart.ChartArea.Interior.ColorIndex = 10; //设置整个图表的背影颜色&&&&&&&&&&& //m_Book.ActiveChart.ChartArea.Border.ColorIndex = 8;// 设置整个图表的边框颜色&&&&&&&&&&& m_Book.ActiveChart.ChartArea.Border.LineStyle = Excel.XlLineStyle.xlLineStyleN//设置边框线条&&&&&&&&&&& m_Book.ActiveChart.HasDataTable =
&&&&&&&&&&& //设置Legend图例的位置和格式&&&&&&&&&&& m_Book.ActiveChart.Legend.Top = 20.00; //具体设置图例的上边距&&&&&&&&&&& m_Book.ActiveChart.Legend.Left = 60.00;//具体设置图例的左边距&&&&&&&&&&& m_Book.ActiveChart.Legend.Interior.ColorIndex = Excel.XlColorIndex.xlColorIndexN&&&&&&&&&&& m_Book.ActiveChart.Legend.Width = 150;&&&&&&&&&&& m_Book.ActiveChart.Legend.Font.Size = 9.5;&&&&&&&&&&& //m_Book.ActiveChart.Legend.Font.Bold =&&&&&&&&&&& m_Book.ActiveChart.Legend.Font.Name = "宋体";&&&&&&&&&&& //m_Book.ActiveChart.Legend.Position = Excel.XlLegendPosition.xlLegendPositionT//设置图例的位置&&&&&&&&&&& m_Book.ActiveChart.Legend.Border.LineStyle = Excel.XlLineStyle.xlLineStyleN//设置图例边框线条
&&&&&&&&&&& //设置X轴的显示&&&&&&&&&&& Excel.Axis xAxis = (Excel.Axis)m_Book.ActiveChart.Axes(Excel.XlAxisType.xlValue, Excel.XlAxisGroup.xlPrimary);&&&&&&&&&&& xAxis.MajorGridlines.Border.LineStyle = Excel.XlLineStyle.xlD&&&&&&&&&&& xAxis.MajorGridlines.Border.ColorIndex = 1;//gridLine横向线条的颜色&&&&&&&&&&& xAxis.HasTitle =&&&&&&&&&&& xAxis.MinimumScale = 1500;&&&&&&&&&&& xAxis.MaximumScale = 6000;&&&&&&&&&&& xAxis.TickLabels.Font.Name = "宋体";&&&&&&&&&&& xAxis.TickLabels.Font.Size = 9;
&&&&&&&&&&& //设置Y轴的显示&&&&&&&&&&& Excel.Axis yAxis = (Excel.Axis)m_Book.ActiveChart.Axes(Excel.XlAxisType.xlCategory, Excel.XlAxisGroup.xlPrimary);&&&&&&&&&&& yAxis.TickLabelSpacing = 30;&&&&&&&&&&& yAxis.TickLabels.NumberFormat = "M月D日";&&&&&&&&&&& yAxis.TickLabels.Orientation = Excel.XlTickLabelOrientation.xlTickLabelOrientationH//Y轴显示的方向,是水平还是垂直等&&&&&&&&&&& yAxis.TickLabels.Font.Size = 8;&&&&&&&&&&& yAxis.TickLabels.Font.Name = "宋体";
&&&&&&&&&&& //m_Book.ActiveChart.Floor.Interior.ColorIndex = 8;& &&&&&&&&&&& /***以下是设置标题*****&&&&&&&&&&& m_Book.ActiveChart.HasTitle=&&&&&&&&&&& m_Book.ActiveChart.ChartTitle.Text = "净值指数";&&&&&&&&&&& m_Book.ActiveChart.ChartTitle.Shadow =&&&&&&&&&&& m_Book.ActiveChart.ChartTitle.Border.LineStyle = Excel.XlLineStyle.xlC&&&&&&&&&&& */
&&&&&&&&&&& oSeries = (Excel.Series)m_Book.ActiveChart.SeriesCollection(1);&&&&&&&&&&& oSeries.Border.ColorIndex = 45;&&&&&&&&&&& oSeries.Border.Weight = Excel.XlBorderWeight.xlT&&&&&&&&&&& oSeries = (Excel.Series)m_Book.ActiveChart.SeriesCollection(2);&&&&&&&&&&& oSeries.Border.ColorIndex = 9;&&&&&&&&&&& oSeries.Border.Weight = Excel.XlBorderWeight.xlT
阅读(...) 评论() &C#导出Excel图表时报出该对象无标题。
[问题点数:20分]
C#导出Excel图表时报出该对象无标题。
[问题点数:20分]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。private&void&button4_Click(object&sender,&EventArgs&e){&&&&try&&&&{&&&&&&&&ThisApplication&=&new&Excel.Application();&&&&&&&&m_objBooks&=&(Excel.Workbooks)ThisApplication.W&&&&&&&&ThisWorkbook&=&(Excel._Workbook)(m_objBooks.Add(Type.Missing));&&&&&&&&ThisApplication.DisplayAlerts&=&false;&&&&&&&&this.DeleteSheet();&&&&&&&&this.AddDatasheet();&&&&&&&&this.LoadData();&&&&&&&&CreateChart();&&&&&&&&ThisWorkbook.SaveAs("z:\\Book2.xls",&Type.Missing,&Type.Missing,&&&&&&&&&&&&&&&&&&&&Type.Missing,&Type.Missing,&Type.Missing,&Excel.XlSaveAsAccessMode.xlNoChange,&&&&&&&&&&&&&&&&Type.Missing,&Type.Missing,&Type.Missing,&Type.Missing);&&&&}&&&&catch&(Exception&ex)&&&&{&&&&&&&&MessageBox.Show(ex.Message);&&&&}&&&&finally&&&&{&&&&&&&&ThisWorkbook.Close(Type.Missing,&Type.Missing,&Type.Missing);&&&&&&&&ThisApplication.Workbooks.Close();&&&&&&&&ThisApplication.Quit();&&&&&&&&&&&&&&&&System.Runtime.InteropServices.Marshal.ReleaseComObject(ThisWorkbook);&&&&&&&&&&&&&&&&System.Runtime.InteropServices.Marshal.ReleaseComObject(ThisApplication);&&&&&&&&ThisWorkbook&=&null;&&&&&&&&ThisApplication&=&null;&&&&&&&&GC.Collect();&&&&&&&&this.Close();&&&&}}Excel.Application&ThisApplication&=&null;Excel.Workbooks&m_objBooks&=&null;Excel._Workbook&ThisWorkbook&=&null;Excel.Worksheet&xlSheet&=&null;/**////&&summary&///&用生成的随机数作数据///&&/summary&private&void&LoadData(){&&&&Random&ran&=&new&Random();&&&&for&(int&i&=&<span style="COLOR: #;&i&&=&<span style="COLOR: #;&i++)&&&&{&&&&&&&&xlSheet.Cells[i,&&<span style="COLOR: #]&=&i.ToString()&+&"月";&&&&&&&&xlSheet.Cells[i,&<span style="COLOR: #]&=&ran.Next(<span style="COLOR: #00).ToString();&&&&&&&&}}/**////&&summary&///&删除多余的Sheet///&&/summary&private&void&DeleteSheet(){&&&&foreach&(Excel.Worksheet&ws&in&ThisWorkbook.Worksheets)&&&&&&&&if&(ws&!=&ThisApplication.ActiveSheet)&&&&&&&&{&&&&&&&&&&&&ws.Delete();&&&&&&&&}&&&&foreach&(Excel.Chart&cht&in&ThisWorkbook.Charts)&&&&&&&&cht.Delete();&&&&&&&&&&&&}/**////&&summary&///&创建一个Sheet,用来存数据///&&/summary&private&void&AddDatasheet(){&&&&xlSheet&=&(Excel.Worksheet)ThisWorkbook.&&&&&&&&Worksheets.Add(Type.Missing,&ThisWorkbook.ActiveSheet,&&&&&&&&Type.Missing,&Type.Missing);&&&&xlSheet.Name&=&"数据";}/**////&&summary&///&创建统计图&&&&&&&&&///&&/summary&private&void&CreateChart(){&&&&Excel.Chart&xlChart&=&(Excel.Chart)ThisWorkbook.Charts.&&&&&&&&Add(Type.Missing,&xlSheet,&Type.Missing,&Type.Missing);&&&&Excel.Range&cellRange&=&(Excel.Range)xlSheet.Cells[<span style="COLOR: #,&<span style="COLOR: #];&&&&xlChart.ChartWizard(cellRange.CurrentRegion,&&&&&&&&Excel.XlChartType.xl3DColumn,&Type.Missing,&&&&&&&&Excel.XlRowCol.xlColumns,<span style="COLOR: #,&<span style="COLOR: #,&true&,&&&&&&&&"访问量比较()",&"月份",&"访问量",&&&&&&&&"");&&&&xlChart.Name&=&"统计";&&&&Excel.ChartGroup&grp&=&(Excel.ChartGroup)xlChart.ChartGroups(<span style="COLOR: #);grp.GapWidth&=&<span style="COLOR: #;&&&&grp.VaryByCategories&=&true;&&&&Excel.Series&s&=&(Excel.Series)grp.SeriesCollection(<span style="COLOR: #);&&&&s.BarShape&=&XlBarShape.xlC&&&&s.HasDataLabels&=&true;&&&&xlChart.Legend.Position&=&XlLegendPosition.xlLegendPositionT&&&&xlChart.ChartTitle.Font.Size&=&<span style="COLOR: #;&&&&xlChart.ChartTitle.Shadow&=&true;&&&&xlChart.ChartTitle.Border.LineStyle&=&Excel.XlLineStyle.xlC&&&&&&&&&&&&&&&&Excel.Axis&valueAxis&=&(Excel.Axis)xlChart.Axes(Excel.XlAxisType.xlValue,&XlAxisGroup.xlPrimary);&&&&valueAxis.AxisTitle.Orientation&=&-<span style="COLOR: #;&&&&Excel.Axis&categoryAxis&=&(Excel.Axis)xlChart.Axes(Excel.XlAxisType.xlCategory,&XlAxisGroup.xlPrimary);&&&&categoryAxis.AxisTitle.Font.Name&=&"MS&UI&Gothic";}

我要回帖

更多关于 chart生成图片 的文章

 

随机推荐