Quantcast
Channel: npoi Discussions Rss Feed
Viewing all articles
Browse latest Browse all 637

New Post: Append data after open/read excel

$
0
0
I want to append some data after reading excel file. How to do this so I am able to append data.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using NPOI.HSSF.UserModel;
using NPOI.HSSF.Util;
using NPOI.SS.UserModel;
using NPOI.SS.Util;
using NPOI.XSSF.UserModel;'

XSSFWorkbook wb;
            using (FileStream file = new FileStream(@"test.xlsx", FileMode.Open, FileAccess.ReadWrite))
            {
                wb = new XSSFWorkbook(file);

                ISheet sheet = wb.GetSheet("Sheet1");                

                sheet.CreateRow(8).CreateCell(0).SetCellValue("testnew row cell value");
            }
Data doesn't append!!!

Viewing all articles
Browse latest Browse all 637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>