The cast exception is caused because you are returning a BLOB from the db. I dont know the exact conversion code but look for formatting blob data in Office 2003 API help or msdn. I know there are examples for images, the same format / code should hold true for excel, with a few refference changes ala (??? as Image = ??? as ExcelFile?).