tagged [interop]

How do multiple languages interact in one project?

How do multiple languages interact in one project? I heard some people program in multiple languages in one project. I can't imagine how the languages interact with each other. I mean there is no Jav...

How to check, programmatically, if MS Excel exists on a pc?

How to check, programmatically, if MS Excel exists on a pc? I have an application that needs MS Excel to run, otherwise it crashes. So I want to check and warn the user in case Excel is not installed ...

10 Sep at 05:50

Disposing of Microsoft.Office.Interop.Word.Application

Disposing of Microsoft.Office.Interop.Word.Application (Somewhat of a follow on from the post (which remains unanswered): [https://stackoverflow.com/q/6197829/314661](https://stackoverflow.com/q/61978...

23 May at 10:30

How can I make SQL case sensitive string comparison on MySQL?

How can I make SQL case sensitive string comparison on MySQL? I have a function that returns five characters with mixed case. If I do a query on this string it will return the value regardless of case...

Releasing temporary COM objects

Releasing temporary COM objects Consider the following C# code using a COM object. This will release the COM objects `o` and `baz`, but not the temporary objects returnd by `o.Foo` and `o.Foo

23 May at 11:43

How to marshal a variable sized array of structs? C# and C++ interop help

How to marshal a variable sized array of structs? C# and C++ interop help I have the following C++ structs And a C++ function How can I marshal this to C#? Where the C# definitions is ``` struct Outer...

28 Jul at 22:53

Obtaining Excel worksheet reference by worksheet name via C#

Obtaining Excel worksheet reference by worksheet name via C# I'm currently obtaining a handle to a Excel worksheet by using the below C# code: Is there any way that I can obtain the same by using the ...

22 Aug at 14:44

Interoperating between Matlab and C#

Interoperating between Matlab and C# After peeking around the internet it looks like it is possible to interop between C# and Matlab. I am wondering if anyone has had success with it and what they did...

.Net Excel Interop Deleting a worksheet

.Net Excel Interop Deleting a worksheet I'm trying to delete a worksheet from a excel document from a .Net c# 3.5 application with the interop Excel class (for excel 2003). I try many things like : It...

24 Mar at 18:56

Set data type like number, text and date in excel column using Microsoft.Office.Interop.Excel in c#

Set data type like number, text and date in excel column using Microsoft.Office.Interop.Excel in c# I am trying to set the data type to an excel column in C#, in this case the data types number, text ...

Which One is Best OLEDB Or Excel Object Or Database

Which One is Best OLEDB Or Excel Object Or Database I need to work with Excel 2007 File for reading the data. for that which one is the best way to do that: 1. Using OLEDB Provider 2. Excel Interop Ob...

Getting excel application process id

Getting excel application process id I am creating an excel application with c#. Since I will maintain the excel file in urgency I want to keep its handler open. I want to keep the excel process id so...

13 Dec at 14:35

Better way to cast object to int

Better way to cast object to int This is probably trivial, but I can't think of a better way to do it. I have a COM object that returns a variant which becomes an object in C#. The only way I can get ...

13 Apr at 20:2

Calling C# code from C++, but ExecuteInDefaultAppDomain() is too limited

Calling C# code from C++, but ExecuteInDefaultAppDomain() is too limited I need to be able to invoke arbitrary C# functions from C++. [In-process Interoperability](http://www.infoq.com/articles/in-pro...

30 May at 21:5

Accessing Excel.ComboBox from C#

Accessing Excel.ComboBox from C# I have a combobox (the drop down list control) in a pre-existing Excel template. I can reference this combobox in VBA with Sheet10.ComboBox1. How can I reference this ...

9 Dec at 18:21

How to read an .RTF file using .NET 4.0

How to read an .RTF file using .NET 4.0 I have seen samples using Word 9.0 object library. But I have Office 2010 Beta and .NET 4.0 in VS2010. Any tips on how to go with the new Word Dlls? So I just w...

4 Mar at 02:40

HRESULT: 0x800A03EC on Worksheet.range

HRESULT: 0x800A03EC on Worksheet.range I am getting HRESULT: 0x800A03EC on Worksheet.range method. Number of rows are more than 70K. Office 2007. Code: Here my rowcount is more than 65530 . Breaks on ...

18 Aug at 13:24

make IntPtr in C#.NET point to string value

make IntPtr in C#.NET point to string value I am using a class which has `StringHandle` field which is an `IntPtr` value that represents a `LPCWSTR` in C++. say now that I have a String: `string x = "...

18 Jun at 20:56

VSTO Outlook addin need to save settings, best way?

VSTO Outlook addin need to save settings, best way? I'm writing a VSTO Outlook add in and i need to save some settings the addin gets from a web service. What is the best way to do this. Registry? doe...

Create Excel files from C# without office

Create Excel files from C# without office I am writing a program that generates excel reports, currently using the Microsoft.Interop.Excel reference. My dev computer has Excel on it, but the end user ...

21 Mar at 08:38

Set System Time Zone from .NET

Set System Time Zone from .NET Does anyone have some code that will take a TimeZoneInfo field from .NET and execute the interop code to set the system time zone via SetTimeZoneInformation? I realize t...

30 Apr at 19:54

What is the Guid attribute that appears above classes in C#?

What is the Guid attribute that appears above classes in C#? I've picked up some C# code recently and one of the classes has a Guid attribute present above it. I don't understand what this is or what ...

21 Sep at 12:28

Setting Word 2007 table style designs in code

Setting Word 2007 table style designs in code I am generating a Word document using Microsoft.Office.Interop.Word. In that word document I am generating a table. I would like to set the table style to...

19 Jan at 14:20

Is it possible to test a COM-exposed assembly from .NET?

Is it possible to test a COM-exposed assembly from .NET? I have a .NET assembly which I have exposed to COM via a tlb file, and an installer which registers the tlb. I have manually checked that the i...

How do I get an entire column in used range?

How do I get an entire column in used range? I am trying to get a column, but limiting it to used range... ``` public static Excel.Application App = new Excel.Application(); public static Excel.Workbo...

23 Mar at 20:50