Ivo Nikolov
8/17/2007 12:57:00 PM
Hi,
I try a couple of times to invoke a method app.Workbooks.Add
- with - null
- with - Missing.Value
- with - Microsoft.Office.Interop.Excel.XlWBATemplate.xlWBATWorksheet
and any time I get this Error
Any suggestions ?
Thanks.
"Ivo Nikolov" <geni_@yhaoo.com> wrote in message news:%23ora$Ya3HHA.5360@TK2MSFTNGP03.phx.gbl...
Hi All
I write on C#
This Code work fine, but un Windows Vista I get an Error Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)
--------program fragment -------------------------------------------------------
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US") ;
Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application() ;
if (app == null)
{
MessageBox.Show("Microsoft EXCEL Not Found!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
return ;
}
// ------------On Next Line I Get an Error : Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT) ---------------------------
//
Microsoft.Office.Interop.Excel.Workbook workbook = app.Workbooks.Add(Microsoft.Office.Interop.Excel.XlSheetType.xlWorksheet); // Error
// ------------------------------------------------------------
Microsoft.Office.Interop.Excel.Worksheet worksheet = (Microsoft.Office.Interop.Excel.Worksheet)(workbook.Worksheets.get_Item(1));