471,603 Members | 1,503 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,603 software developers and data experts.

Can't open Workbook...(Excel 2003 and C# Visual Studio 2005)


I've done a lot in Excel Automation in prior C# and VB.Net Versions...but
I've no chance just to open an Excel Workbook with Visual Studio 2005. I've
go always these HRESULT-Failures...:-(

Thanks for your help...

Here's one of the code trials:

using Office = Microsoft.Office.Core;
using Excel = Microsoft.Office.Interop.Excel;
Excel.Application ObjExcel;
Excel.Workbook ObjExcelBook;
Excel.Worksheet ObjExcelSheet;

ObjExcel = new Excel.Application();
ObjExcel.Visible = true;
ObjExcelBook = ObjExcel.Workbooks.Open(@"C:/TMP/Test.xls", false,

Type.Missing,Type.Missing,Type.Missing ,Type.Missing ,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);
Feb 10 '06 #1
2 2554
are you having this problem?

Feb 10 '06 #2
You're right....hmmm....I've set the Culture info in the old projects always
in a global load section too....:-)

System.Threading.Thread.CurrentThread.CurrentCultu re = new
System.Threading.Thread.CurrentThread.CurrentUICul ture = new


"Simon Dahlbacka" wrote:
are you having this problem?

Feb 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by A frustrated developer | last post: by
8 posts views Thread by SteveS | last post: by
2 posts views Thread by ChrisFrohlich | last post: by
1 post views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.