下载地址为:http://npoi.codeplex.com/releases/view/616131
可以操作excel表,行,单元格内家及样式等。
 
使用示例:
            using (FileStream fs = File.OpenRead(@"E:\a.xls"))   //打开myxls.xls文件
            {
                HSSFWorkbook wk = new HSSFWorkbook(fs);   //把xls文件中的数据写入wk中
                wk.RemoveSheetAt(0);
 
                using (FileStream fileHSSF = new FileStream(@"E:\a.xls", FileMode.Create))
                {
                    wk.Write(fileHSSF);
                    fileHSSF.Close();
                }
                wk.Close();
                fs.Close();
            }
05-11 15:51