Have you created the excel workbook object........
can you post that part of the code also.......