Showing posts with label MS Office. Show all posts
Showing posts with label MS Office. Show all posts

Friday, July 27, 2012

Exception from HRESULT: Excel automation issues

I was getting bizarre Exception from HRESULT: on vista where it worked fine on xp
I tried setting security to allow vba projects - nyet
I tried dcom - it wasnt there
I finally tried savecopyas   lo  and behold - it worked

Friday, June 29, 2012

Interop excel

I went through hell getting the right saveas format
until I started using
XlFileFormat.xlXMLSpreadsheet

thus:


workBook.SaveAs(path,
                 XlFileFormat.xlXMLSpreadsheet,
                Type.Missing, Type.Missing,
                false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
                Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);