Hi all, I need a small help with NPOI and asp.net.
I'm trying to create an excel file from a web application, written in asp.net (vb).
Everything is fine with excel 2003 xls format, while using the XSSF object model I get corrupted files.
Opening files in Excel I get the message that says file is corrupted, and can be restored (and actually Excel repairs it). The problem occurs even if I try to save stream into a file, rather than using memorystream.
Help is appreciated...
Here's the code, see attachment for error:
Dim wb As New XSSFWorkbook
Dim ws As new XSSFSheet
ws = wb.CreateSheet("Sheet1")
Dim r As XSSFRow
r = ws.CreateRow(0)
Dim c = r.CreateCell(0)
Dim m As New IO.MemoryStream
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"