2021年11月8日

跨文档复制excel sheet 页

摘要: public class CopyManager { public static KeyValuePair<bool,string> CopyWithMessage(string sourcefile, string destfile) { Microsoft.Office.Interop.Exce 阅读全文

posted @ 2021-11-08 10:21 GIS-MAN 阅读(167) 评论(0) 推荐(0) 编辑

2019年12月31日

c# 利用word 软件生成word里面的table

摘要: public static void GenerateWordTable(string title) { Range rng=CaCheContext.doc.Range(); Table table= CaCheContext.doc.Tables.Add(rng, 3, 3,true,true); table.Rows[1].Cells[1].Range.Text = "图表1:" + tit 阅读全文

posted @ 2019-12-31 13:25 GIS-MAN 阅读(522) 评论(0) 推荐(0) 编辑

2019年12月30日

c# 获得当前打开的word 文档

摘要: Microsoft.Office.Interop.Word.Application wdApp = (Microsoft.Office.Interop.Word.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Word.Application"); Microsoft.Office.Interop.Word.D 阅读全文

posted @ 2019-12-30 10:24 GIS-MAN 阅读(1296) 评论(0) 推荐(0) 编辑

2019年12月26日

vsto c# 修改图表chart 的排列方式 和宽度

摘要: public void ResizeChartPoint(Series Orig) { Microsoft.Office.Interop.Excel.Points points1 = Orig.Points(); for (int j = 1; j <= points1.Count; j++) { points1.Item(j).PictureType = Microsoft.Office.Int 阅读全文

posted @ 2019-12-26 11:22 GIS-MAN 阅读(564) 评论(0) 推荐(0) 编辑

2019年12月24日

vsto c# 获取word里面的图片并保存

摘要: internal void GetEmbeddedImages() { int i = 0; Document doc = Globals.ThisAddIn.Application.ActiveDocument; foreach (Microsoft.Office.In... 阅读全文

posted @ 2019-12-24 14:00 GIS-MAN 阅读(1163) 评论(0) 推荐(0) 编辑

vsto 将图片加入到word里面

摘要: private void AddPictoWord() { string folderpath = @"C:\Users\k0021213\Pictures\QQ浏览器截图"; DirectoryInfo dicrectory = new DirectoryInfo(folderpath); FileInf... 阅读全文

posted @ 2019-12-24 13:28 GIS-MAN 阅读(588) 评论(0) 推荐(0) 编辑

2019年12月23日

c# VSTO 将word 里面的图表保存成图片

摘要: private void button1_Click(object sender, RibbonControlEventArgs e) { Document doc = Globals.ThisAddIn.Application.ActiveDocument; Paragraphs pp= doc.Content.Paragraphs; Form1 form = new Form1(); form 阅读全文

posted @ 2019-12-23 14:46 GIS-MAN 阅读(788) 评论(0) 推荐(0) 编辑

2019年12月17日

excel 知识备忘

摘要: 另一种填充图表线颜色的方法 阅读全文

posted @ 2019-12-17 10:41 GIS-MAN 阅读(245) 评论(0) 推荐(0) 编辑

2019年12月11日

vsto 以隐藏的方式打开一个excel 文件 并获得excel文件的缩略图

摘要: public byte[] GetExcelPictureFile(string filepath) { Workbook workbook=null; Microsoft.Office.Interop.Excel.Application excelApp = newMicrosoft.Office 阅读全文

posted @ 2019-12-11 16:11 GIS-MAN 阅读(828) 评论(0) 推荐(0) 编辑

2019年11月25日

vsto 检测是否在编辑状态或者光标闪动

摘要: object m = Type.Missing; const int MENU_ITEM_TYPE = 1; const int NEW_MENU = 18; CommandBarControl oNewMenu = ExcelGlobals.Application.CommandBars["Wor 阅读全文

posted @ 2019-11-25 09:37 GIS-MAN 阅读(288) 评论(0) 推荐(0) 编辑

导航