首页 > 其他 > 详细

笔记12 export to excel (NPOI)

时间:2015-10-08 19:53:30      阅读:255      评论:0      收藏:0      [点我收藏+]

1:filestream

熟悉关于文件操作

==》fs.Seek(0, SeekOrigin.Begin);//每次打开文件,

==》若果重写覆盖的话,必须先清空 fs.SetLength(0);

2:使用命名空间

using (FileStream fs = new FileStream(strFileName, FileMode.OpenOrCreate))

{
fs.Seek(0, SeekOrigin.Begin);
workbook.Write(fs);
// fs.Flush();
}

3:接口的使用

 

笔记12 export to excel (NPOI)

原文:http://www.cnblogs.com/newcoder/p/4861728.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!