473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

Hi

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,
true,

Type.Missing,Type.Missing,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 2606
are you having this problem?
(http://support.microsoft.com/?kbid=320369)

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.Globalization.CultureInfo("en-US");
System.Threading.Thread.CurrentThread.CurrentUICul ture = new
System.Globalization.CultureInfo("en-US");

Thanks....

"Simon Dahlbacka" wrote:
are you having this problem?
(http://support.microsoft.com/?kbid=320369)

Feb 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Geert-Pieter Hof | last post by:
Hello, My VB 6.0 application read and writes data from and to a MS Excel workbook, using the Microsoft.Jet.OLEDB.4.0 provider. Now I want to protect the Excel workbook with a password, but I...
2
by: brazilnut52 | last post by:
I am going to outline the steps I go through to produce the problem. Hopefully this will help you understand the problem better I have created a simple COM DLL in .NET by using the COM class...
4
by: A frustrated developer | last post by:
The following article discussed how to use the Excel, close and kill it: http://support.microsoft.com/default.aspx?scid=kb;en-us;317109 But if you added a oBook.SaveAs(...) to save the workbook...
16
by: LP | last post by:
Hello, I am trying to use .NET with Excel. I installed Office 2003 and selected ..NET programming suport option, so it installed all those PIA, as MS sugests. But I can not find a way to destroy...
8
by: SteveS | last post by:
I'm attempting to close EXCEL from within my VB.NET application. Using the excel object library to write data to my spreadsheet is working fine but when I try to quit application object it does not...
2
by: ChrisFrohlich | last post by:
I have been trying to use the Office PIA's to write an ASP.NEt page to: 1. Open a template workbook 2. Populate some data 3. Save the file back to the server 4. Quit Excel and free up Memory I...
9
by: John Brock | last post by:
I am trying to create a workbook where one of the worksheets contains an AutoFiltered table. It looks like it should be simple -- what I am doing is this: rng = ws.Range("MyTableRange")...
0
by: mix01 | last post by:
Hi, I am trying to get some VBA code working, but am preplex as to why it does not work. I would really appreciate any level of help. Many thanks, Mix01 Version of the program
2
by: Jeroen | last post by:
The group and search engines revealed many hints on how to use the 'Open With...' dialog, for example at: http://www.codeproject.com/csharp/openwith.asp Now in addition to a solution as...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.