Hello,
I am using Closed XML to generate Excel reports in VB.NET in the following way:
Workbook.SaveAs("myFile.xlsx")
Dim BinaryData() As Byte = File.ReadAllBytes("myFile.xlsx")
Response.AddHeader("Content-Length", BinaryData.Length - 1)
Response.AppendHeader("Content-Disposition", "attachment; filename=myFile.xlsx")
Response.BinaryWrite(BinaryData)
When I use Excel 2010 to open the file, everything works perfectly.
When I use Excel 2007 to open the file, it opens up with a bunch of gibberish.
Does anyone have any ideas about what might be casuing this?
I am using Closed XML to generate Excel reports in VB.NET in the following way:
Workbook.SaveAs("myFile.xlsx")
Dim BinaryData() As Byte = File.ReadAllBytes("myFile.xlsx")
Response.AddHeader("Content-Length", BinaryData.Length - 1)
Response.AppendHeader("Content-Disposition", "attachment; filename=myFile.xlsx")
Response.BinaryWrite(BinaryData)
When I use Excel 2010 to open the file, everything works perfectly.
When I use Excel 2007 to open the file, it opens up with a bunch of gibberish.
Does anyone have any ideas about what might be casuing this?