I have created a excel file using File.WriteAllText(path, strhtml). as it had direct html table. I dont know if there is a way to create a excel file using html with NPOI. once the file is created i have to add an image to another sheet in the file.
I am opeing the excel file using this code.
hssfworkbook = New HSSFWorkbook(file)
Invalid header signature; read 0x2020202020202020, expected 0xE11AB1A1E011CFD0
I am opeing the excel file using this code.
Dim file As New FileStream(Server.MapPath("~") & "ExternalPerformanceTrend2.xls", FileMode.Open, FileAccess.Read)
but when i pass file to HSSFWorkbook then it gives this error.hssfworkbook = New HSSFWorkbook(file)
Invalid header signature; read 0x2020202020202020, expected 0xE11AB1A1E011CFD0