C# 操作Excel之Excel操作方法调用
C# 操作Excel之Excel操作方法调用1.插入图片和线调用
- PictureInExcel ipt = new PictureInExcel();
- ipt.Open();
- //ipt.InsertPicture("B2", @"C:\www.jpg");
- //ipt.InsertPicture("B8", @"C:\www.jpg", 1000, 800);
- ipt.InsertPicture("B2","F8", @"C:\www.jpg",true);
- ipt.InsertLine("B9", "F15", true);
- ipt.InsertPicture("B16", "F22", @"C:\www.jpg", false);
- ipt.InsertLine("B23", "F29", false);
- ipt.SaveFile(@"C:\ExcelTest.xls");
- ipt.Dispose();
C# 操作Excel之Excel操作方法调用2.删除行方法调用
- PictureInExcel ipt = new PictureInExcel();
- ipt.Open(@"C:\ExcelTest.xls");
- ipt.DeleteRow(1,1);
- ipt.SaveFile(@"C:\ExcelTest.xls");
- ipt.Dispose();
C# 操作Excel之Excel操作方法调用3.删除列方法调用
- PictureInExcel ipt = new PictureInExcel();
- ipt.Open(@"C:\ExcelTest.xls");
- ipt.DeleteColumn(1, 1);
- ipt.SaveFile(@"C:\ExcelTest.xls");
- ipt.Dispose();
C# 操作Excel之Excel操作方法调用的基本内容就向你介绍到这里,希望对你了解和学习C# 操作Excel有所帮助。
【编辑推荐】