当前位置:编程学习 > C#/ASP.NET >>

C# 技术 怎样判断Excel 表格里面的某行有内容

c# 操作 Excel表格,怎样判断Excel 中 sheet1 的任意一行 中有内容!!求高手! --------------------编程问答-------------------- 可以使用NPOI轻量级的组件来读取Excel。
http://tonyqus.sinaapp.com/npoi2tutorial
http://www.cnblogs.com/linzheng/archive/2010/12/20/1912137.html --------------------编程问答-------------------- http://www.dzwebs.net/3645.html --------------------编程问答-------------------- http://www.cnblogs.com/wangzhisheng/p/3417051.html --------------------编程问答-------------------- http://www.cr173.com/html/18143_all.html --------------------编程问答-------------------- http://blog.csdn.net/redder_xu/article/details/6753418 --------------------编程问答-------------------- 需要用到第三方程序集Aspose,你可以在网上下一个
这个程序集可以再没安装OFFICE的PC上读取OFFICE文档。
代码如下:

  Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook();
  workbook.Open("C:\\Users\\Administrator\\Desktop\\TEST.xlsx");

  Aspose.Cells.Worksheet sheet = workbook.Worksheets[0];

  try
  {
       label1.Text = sheet.Cells[1, 0].Value.ToString();
  }
  catch { label1.Text = "null"; }
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,