ATL Question

F

Fredrik Wahlgren

Hi

I have used ATL a couple of times to make excel autoamtion add-ins. So far,
I have only made functions that take simple arguments like strings or
integers. I now want to do so something a little more complicted. What I
have in mind requires that one of the parameters is an Excel Range object.
But I don't know how to do this. My guess is that I use something like an
IDispatch pointer and then edit the files manually. When I enter the
function in a cell, I want Excel ro recognize that the parameter should be a
Range

Anty help is appreciated.

/Fredrik
 
A

Arnaud Debaene

Fredrik said:
Hi

I have used ATL a couple of times to make excel autoamtion add-ins.
So far, I have only made functions that take simple arguments like
strings or integers. I now want to do so something a little more
complicted. What I have in mind requires that one of the parameters
is an Excel Range object. But I don't know how to do this.
use #import on the Excel tlb to generate a wrapper class around all Excel
types, including Range.

Arnaud
MVP - VC
 
F

Fredrik Wahlgren

Arnaud Debaene said:
use #import on the Excel tlb to generate a wrapper class around all Excel
types, including Range.

Arnaud
MVP - VC

How do Igenerate wrapper classes? Is there a site which explains how to
proceed? I assume this means I have to use MFC, right?

/Fredrik

/
 
F

Fredrik Wahlgren

Arnaud Debaene said:
As i said, use the #import directive. The doc is here :
http://msdn.microsoft.com/library/d...redir_The_.23.import_Directive.asp?frame=true
You assume wrongly...

Arnaud
MVP - VC

I think I know how to do this know. I managed to implement an interface
written in C#. And sure enough, there was my Range parameter. I suppose that
if I wanted to create a function "Manually", using the wixzard, I would
select an IDsipatch pointer and then manually change it to Excel::Range. I
think that in VC6, you had to deal with the idl file as well.

/Fredrik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top