This project has moved and is read-only. For the latest updates, please go here.

Save Excel file to database

Jun 13, 2011 at 9:10 AM
Edited Jun 13, 2011 at 9:10 AM

Is there anyway that I can save the excel file I have generated to a database?

Jun 13, 2011 at 4:20 PM

There is no build in functionallity for that, but if you want to save the entire package/workbook to the database use the package.GetAsByteArray method and save the byte array to a binary column.

Jun 14, 2011 at 2:22 PM
Edited Jun 14, 2011 at 2:23 PM

Thanks jankallman, It was only after I posted that I saw the method on the package object to return a byte array.

Mind you, an overloaded constructor on the excelpackage that takes a database connection would be cool too ;-)