非常好用的 C# winform 操作EXCEL文件源代码

上传者: jxf16888 | 上传时间: 2010-05-12 00:00:00 | 文件大小: 627KB | 文件类型: rar
private void button1_Click(object sender, System.EventArgs e) {//保存为EXCEL文件 if(this.listView1.Items.Count0) { MyRange =MyWorkSheet.get_Range("A2",Missing.Value); object [,] MyData = new Object[this.listView1.Items.Count,3]; foreach(ListViewItem lvi in this.listView1.Items) { MyData[lvi.Index,0] = lvi.Text; MyData[lvi.Index,1] = lvi.SubItems[1].Text; MyData[lvi.Index,2] = lvi.SubItems[2].Text; } MyRange = MyRange.get_Resize(this.listView1.Items.Count,3); MyRange.Value2= MyData; MyRange.EntireColumn.AutoFit(); } MyExcel= null; } catch(Exception Err) { MessageBox.Show("调用EXCEL程序时出现错误!"+Err.Message,"信息提示",MessageBoxButtons.OK,MessageBoxIcon.Information); } }

文件下载

资源详情

[{"title":"( 19 个子文件 627KB ) 非常好用的 C# winform 操作EXCEL文件源代码","children":[{"title":"File.suo <span style='color:#111;'> 7.50KB </span>","children":null,"spread":false},{"title":"Form1.cs <span style='color:#111;'> 6.41KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Release","children":[{"title":"Interop.Excel.dll <span style='color:#111;'> 1.04MB </span>","children":null,"spread":false},{"title":"Interop.Microsoft.Office.Core.dll <span style='color:#111;'> 212.00KB </span>","children":null,"spread":false},{"title":"Interop.VBIDE.dll <span style='color:#111;'> 56.00KB </span>","children":null,"spread":false},{"title":"File.exe <span style='color:#111;'> 28.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"obj","children":[{"title":"Interop.Excel.dll <span style='color:#111;'> 1.04MB </span>","children":null,"spread":false},{"title":"Interop.Microsoft.Office.Core.dll <span style='color:#111;'> 212.00KB </span>","children":null,"spread":false},{"title":"Interop.VBIDE.dll <span style='color:#111;'> 56.00KB </span>","children":null,"spread":false},{"title":"Release","children":[{"title":"MyFile.Form1.resources <span style='color:#111;'> 8.96KB </span>","children":null,"spread":false},{"title":"temp","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"File.exe <span style='color:#111;'> 28.00KB </span>","children":null,"spread":false},{"title":"File.projdata <span style='color:#111;'> 8.38KB </span>","children":null,"spread":false}],"spread":true},{"title":"Interop.Word.dll <span style='color:#111;'> 640.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"File.csproj.user <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false},{"title":"File.sln <span style='color:#111;'> 893B </span>","children":null,"spread":false},{"title":"File.csproj <span style='color:#111;'> 5.86KB </span>","children":null,"spread":false},{"title":"App.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"Form1.resx <span style='color:#111;'> 9.69KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false}],"spread":true}]

评论信息

  • wgyskjuv :
    10分有点多了,不是很值
    2016-12-22
  • pliflier :
    不要花积分下载,不好用
    2016-02-18
  • 贝爷_野外求生 :
    垃圾啊,根本没用,2001年用vs2007写的个简单代码,各种错误,建议各位省省10积分吧
    2015-10-29
  • niumie :
    还好吧,参考一下
    2015-08-13
  • huming870619 :
    东西还可以,就是太简单了,不过还是谢谢分享
    2015-07-24

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明