Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

Commented Unassigned: Reg. Error while Saving Excel using NPOI 2.0Beta [12558]

$
0
0
FileStream file = new FileStream(@"C:\test.xls", FileMode.Open, FileAccess.ReadWrite);

HSSFWorkbook wrkBook = new HSSFWorkbook(file);
ISheet ws = wrkBook.GetSheetAt(1);

IRow r = ws.GetRow(20);
ICell c = r.GetCell(3);

c.SetCellValue("ABC");

wrkBook.Write(file);

file.Close();

Here I am getting the error "Cannot access closed file" at line " wrkBook.Write(file);" .

Can anyone please help me ?
Comments: ** Comment from web user: tonyqus **

Looks weird. Which version are you using? NPOI beta (2.0.1) or beta2 (2.0.5)


Viewing all articles
Browse latest Browse all 1621

Trending Articles



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