I have downloaded NPOI and I am doing a very basic example of loading in a Excel spreasheet and changing a cell. For some reason I get a Object Not Set to an Instance Error. I am using the below code and all I have done is gone to Excel and created
a new .xls document called TestExcel and then I try and change a field.
Dim fs As New FileStream(Server.MapPath(“TestExcel.xls”), FileMode.Open, FileAccess.Read)
Dim templateWorkbook As New HSSFWorkbook(fs, True)
Dim sheet As HSSFSheet = templateWorkbook.GetSheet(“Sheet1″)
What am i doing wrong? Do I need to do something to the cell in Excel maybe?
Many thanks in advance