word插入excel图表(office组件)
internal void InsertExcelChart() { Word.InlineShape ilsChartObject; Word.Selection sel; object oClassType = "Excel.Chart.8"; object oFileName = string.Empty; object oLinkToFile = System.Type.Missing; object oDisplayAsIcon = false; object oIconFileName = System.Type.Missing; object oIconIndex = System.Type.Missing; object oIconLabel = System.Type.Missing; object oRange = System.Type.Missing; try { sel = this.ActiveWindow.Selection; if (sel != null) { ilsChartObject = sel.InlineShapes.AddOLEObject(ref oClassType, ref oFileName, ref oLinkToFile, ref oDisplayAsIcon, ref oIconFileName, ref oIconIndex, ref oIconLabel, ref oRange); if (ilsChartObject != null) { //TODO: do something with your chart object now ... } } } catch (Exception ex) { MessageBox.Show(ex.Message, "Insert Chart Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } internal void InsertExcelChart() { Word.InlineShape ilsChartObject; Word.Selection sel; object oClassType = "Excel.Chart.8"; object oFileName = string.Empty; object oLinkToFile = System.Type.Missing; object oDisplayAsIcon = false; object oIconFileName = System.Type.Missing; object oIconIndex = System.Type.Missing; object oIconLabel = System.Type.Missing; object oRange = System.Type.Missing; try { sel = this.ActiveWindow.Selection; if (sel != null) { ilsChartObject = sel.InlineShapes.AddOLEObject(ref oClassType, ref oFileName, ref oLinkToFile, ref oDisplayAsIcon, ref oIconFileName, ref oIconIndex, ref oIconLabel, ref oRange); if (ilsChartObject != null) { //TODO: do something with your chart object now ... } } } catch (Exception ex) { MessageBox.Show(ex.Message, "Insert Chart Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }
专业从事基于C#,WinForm ,WPF,Silverlight,WCF以及MS Sql Server 2000/2005/2008/2012 Oracle 9i/10g/11g数据库系统的ERP,CRM,企业进销存等各种数据库管理系统开发。Asp.net,Asp.net mvc,Webservice,WCF, Webapi等服务程序开发。
基于Oracle MySQL MSSql postgresql各种数据库的管理系统数据同步服务。以及基于MapXtreme, Arcgis Engine ,以及基于Arcgis for silverlight/Javascript的WebGIS等相关的GIS系统二次开发。基于Windows 10 Mobile的移动端开发方案。针对各种系统的二次开发维护,并提供相关开发的技术性支持,如程序BUG解决,应用系统架构,技术难题攻克等相关技术服务。
联系方式: QQ :80163278(devgis) 邮箱:devgis@qq.com