Hi All
I am now on to writing my second application! lol, and am a bit stuck on this one...
I have written an application that uses a 2d array to write to an excel spreadsheet. I then use the SaveAs method of the Excel.Application namespace to Save the file, i have set the filename to end with a .xls
I have Office 2007 on my machine and therefore have used the COM reference for Excel Library 12(or something like that)
The code i have created works fine, the file gets created. However when i goto open the spreadsheet from within excel 2007 it comes up saying the file is not formatted as expected.
If i change the filename i save to .xlsx and then open within Excel, it opens fine.
I want my application to work for people if they have office 2007 or office 2003...
Is there a way i can set the file format to an office 2003 from within the code? or do i need to use a different com reference?
As explained this is only my 2nd application, so am still finding my feet big time!
Thanks
I am now on to writing my second application! lol, and am a bit stuck on this one...
I have written an application that uses a 2d array to write to an excel spreadsheet. I then use the SaveAs method of the Excel.Application namespace to Save the file, i have set the filename to end with a .xls
I have Office 2007 on my machine and therefore have used the COM reference for Excel Library 12(or something like that)
The code i have created works fine, the file gets created. However when i goto open the spreadsheet from within excel 2007 it comes up saying the file is not formatted as expected.
If i change the filename i save to .xlsx and then open within Excel, it opens fine.
I want my application to work for people if they have office 2007 or office 2003...
Is there a way i can set the file format to an office 2003 from within the code? or do i need to use a different com reference?
As explained this is only my 2nd application, so am still finding my feet big time!
Thanks