I'm trying to use the NPOI library in a winforms app. I have referenced the latest NPOI dll in my project and tried to reproduce the examples gave by NPOI and found on SO:
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.CreateSheet("Sheet1");
HSSFRow headerRow = sheet.CreateRow(0);
But this won't compile on my machine because HSSFWorkbook.CreateSheet()
returns a NPOI.SS.UserModel.Sheet
instead of a NPOI.SS.UserModel.HSSFSheet
.
What am I missing here ?