I\'m having a little problem when I generate an Excel file from a template, using the EPPlus library. The file has a first spreadsheet that contains data that is used for po
I just ran into this problem myself and fixed it, putting my solution here should someone else run into it:
This was using asp.net, for obvious reasons it's not applicable otherwise.
My problem wasn't the table range, Epplus generated the file just fine, but rather that the server response was appending the page response to the excel file, obviously making the file invalid. Ending the server response immediately after sending the file fixed my problem, something to the tune of:
Response.BinaryWrite(pck.GetAsByteArray()); // send the file
Response.End();