comobject

Microsoft.Office.Interop.Excel doesn't work on 64 bit

一曲冷凌霜 提交于 2019-11-29 06:52:09
I've encountered a problem when developing on MS Visual Web Developer 2008 Express Ed. Developing ASP.NET C# on Windows7 64 bit OS. I'm trying to open an Excel document, but it gives me Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) I did configured the build to all processors (Any CPU, x64, x86) but it doesn't work. I searched the answer on the internet but couldn't find out how to handle it. The weird thing is the same code worked on the same system when I developed on Microsoft Visual C# 2010 Express! how come? isn't it the same dll working

How to get actual JavaScript value in onclick from webbrowser control?

非 Y 不嫁゛ 提交于 2019-11-29 02:47:42
问题 I'm looking for a way to get the JavaScript code defined inside of onclick. I'm using .NET 2.0 C# Visual Studio 2005. Example: <span id="foo" onclick+"window.location.href='someURL'>click here</span> My goal is to get the string "window.location.href='someURL'" . Scenario: A user clicks on web page element, the tag shown above for instance, inside of WebBrowser control. Then the clicked tag is refereed to H tmlElement object . In WebBrowser control I then call HtmlElement object's

How return the type of a System.__COMObject in System.Type in C#

牧云@^-^@ 提交于 2019-11-28 00:42:29
问题 I'm doing a program and I want to do a Reflection, but for this, I need an Object of the Type class, right? to use the .GetProperties() method... So I tryed this: Type typeName = simObjects.getType(); But the .GetType() is returning "System.__COMObject". And this is not helpfull. The same happens with .typeof(). I search and found another code, this one: Type typeName = (Type)Microsoft.VisualBasic.Information.TypeName(simObjects); But this method return a String, and I need it in System.Type,

Microsoft.Office.Interop.Excel doesn't work on 64 bit

╄→尐↘猪︶ㄣ 提交于 2019-11-28 00:20:09
问题 I've encountered a problem when developing on MS Visual Web Developer 2008 Express Ed. Developing ASP.NET C# on Windows7 64 bit OS. I'm trying to open an Excel document, but it gives me Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) I did configured the build to all processors (Any CPU, x64, x86) but it doesn't work. I searched the answer on the internet but couldn't find out how to handle it. The weird thing is the same code worked on the same