Click here to Skip to main content
16,020,417 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using the following code to read from excel using NPOI. How do i write to an existing file. Please Help.

C++
     HSSFWorkbook hssfwb;
ISheet sheet;
using (FileStream stream = new FileStream(@filePath, FileMode.Open, FileAccess.Read))
             {
                 hssfwb = new HSSFWorkbook(stream);
                 sheet = hssfwb.GetSheet("Sheet1");
                 //sheet.GetRow(1).GetCell(8).SetCellValue("something");
}
                    var xclDiseaseId = sheet.GetRow(0).GetCell(0).NumericCellValue;
Posted
Comments
[no name] 14-Apr-15 5:32am    
Have you checked the NPOI documentation?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900