Worksheets Incompatible with Excel 2007

Jul 5, 2013 at 4:27 PM
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?