|
|
|
date: Tue, 09 Oct 2007 17:17:59 -0000,
group: microsoft.public.excel.sdk
back
Re: XLL with COM interfaces or automation addin using .NET
Hi Mousam,
You might like to try ExcelDna (http://groups.google.com/group/
exceldna) as a way of following your first approach. It allows you to
easily create Excel add-ins using .Net, and still get the advantages
of .xlls.
You can indeed use Excel's automation interfaces from an .xll.
ExcelDna gives some help in getting hold of the root Application
object and includes some examples of how to use it. You need to be a
bit careful about the version of the automation interfaces (and
related interop assembly) you write against - these change with every
version of Excel. An alternative is to do late-binding from Visual
Basic, which works across versions without reference to an interop
assembly.
Regards,
Govert
On Oct 9, 7:17 pm, Mousam wrote:
> Hi,
> I am looking to create an add-in for excel (latest versions) what's
> the recommended approach?
>
> 1. Create XLL using Excel C API, also use Excel's Com interface from
> inside XLL for the tasks that can not be done using Excel C API
> (Though I am not sure whether this will work or not)
> 2. Excel automation add in using .NET
>
> First thing I want to know is it possible to use COM interfaces inside
> XLL? If yes can any one please guide me how can I use COM interfaces
> inside XLL?
>
> I personally want to go with the 1st approach because of the
> performance (speed) of the Excel C API. But at the same time I am
> worrying about is there any thing that can be done using 2nd approach
> but can not be done using 1st approach?
>
> Please suggest me which approach to follow?
>
> Thanks & Regards,
> Mousam Dubey
date: Wed, 10 Oct 2007 03:55:18 -0700
author: Govert van Drimmelen
Re: XLL with COM interfaces or automation addin using .NET
On Oct 10, 3:55 pm, Govert van Drimmelen wrote:
> Hi Mousam,
>
> You might like to try ExcelDna (http://groups.google.com/group/
> exceldna) as a way of following your first approach. It allows you to
> easily create Excel add-ins using .Net, and still get the advantages
> of .xlls.
>
> You can indeed use Excel's automation interfaces from an .xll.
> ExcelDna gives some help in getting hold of the root Application
> object and includes some examples of how to use it. You need to be a
> bit careful about the version of the automation interfaces (and
> related interop assembly) you write against - these change with every
> version of Excel. An alternative is to do late-binding from Visual
> Basic, which works across versions without reference to an interop
> assembly.
>
> Regards,
> Govert
>
> On Oct 9, 7:17 pm, Mousam wrote:
>
> > Hi,
> > I am looking to create an add-in for excel (latest versions) what's
> > the recommended approach?
>
> > 1. Create XLL using Excel C API, also use Excel's Com interface from
> > inside XLL for the tasks that can not be done using Excel C API
> > (Though I am not sure whether this will work or not)
> > 2. Excel automation add in using .NET
>
> > First thing I want to know is it possible to use COM interfaces inside
> > XLL? If yes can any one please guide me how can I use COM interfaces
> > inside XLL?
>
> > I personally want to go with the 1st approach because of the
> > performance (speed) of the Excel C API. But at the same time I am
> > worrying about is there any thing that can be done using 2nd approach
> > but can not be done using 1st approach?
>
> > Please suggest me which approach to follow?
>
> > Thanks & Regards,
> > Mousam Dubey
Hi Govert,
Thanks for your reply/help. The reason I want to use C++ instead
of .NET is I am much more comfortable with C++. The use of .NET would
mean extra learning cost of .NET. Therefore as of now I don't want to
shift to .NET if same thing I can achieve with C++.
Thanks & Regards,
Mousam Dubey
date: Thu, 11 Oct 2007 07:31:42 -0000
author: Mousam
Re: XLL with COM interfaces or automation addin using .NET
"Mousam" wrote in message
news:1191950279.668219.259870@r29g2000hsg.googlegroups.com...
> Hi,
> I am looking to create an add-in for excel (latest versions) what's
> the recommended approach?
>
> 1. Create XLL using Excel C API, also use Excel's Com interface from
> inside XLL for the tasks that can not be done using Excel C API
> (Though I am not sure whether this will work or not)
> 2. Excel automation add in using .NET
>
> First thing I want to know is it possible to use COM interfaces inside
> XLL? If yes can any one please guide me how can I use COM interfaces
> inside XLL?
http://support.microsoft.com/kb/301443 says not to do this,
but it seems to be possible. Steve Dalton describes how to
do this in his book _Excel add-in development in C/C++_.
> I personally want to go with the 1st approach because of the
> performance (speed) of the Excel C API. But at the same time I am
> worrying about is there any thing that can be done using 2nd approach
> but can not be done using 1st approach?
>
> Please suggest me which approach to follow?
What, exactly, do you need to do via a COM interface? You
might be able to just use Excel4, as blessed by Microsoft.
Let me know if you want to get on the beta test program for the
xll library that makes using the C API easy and fun.
http://kalx.net/xll/README.htm
Keith A. Lewis | KALX, LLC | http://kalx.net
440 Ninth Ave., 8th Floor | New York, NY 10001
Phone: 212.404.2311 | Fax: 212.404.3228
date: Thu, 11 Oct 2007 12:15:00 -0400
author: Keith A. Lewis
Re: XLL with COM interfaces or automation addin using .NET
On Oct 11, 9:15 pm, "Keith A. Lewis" wrote:
> "Mousam" wrote in message
>
> news:1191950279.668219.259870@r29g2000hsg.googlegroups.com...
>
> > Hi,
> > I am looking to create an add-in for excel (latest versions) what's
> > the recommended approach?
>
> > 1. Create XLL using Excel C API, also use Excel's Com interface from
> > inside XLL for the tasks that can not be done using Excel C API
> > (Though I am not sure whether this will work or not)
> > 2. Excel automation add in using .NET
>
> > First thing I want to know is it possible to use COM interfaces inside
> > XLL? If yes can any one please guide me how can I use COM interfaces
> > inside XLL?
>
> http://support.microsoft.com/kb/301443says not to do this,
> but it seems to be possible. Steve Dalton describes how to
> do this in his book _Excel add-in development in C/C++_.
>
> > I personally want to go with the 1st approach because of the
> > performance (speed) of the Excel C API. But at the same time I am
> > worrying about is there any thing that can be done using 2nd approach
> > but can not be done using 1st approach?
>
> > Please suggest me which approach to follow?
>
> What, exactly, do you need to do via a COM interface? You
> might be able to just use Excel4, as blessed by Microsoft.
> Let me know if you want to get on the beta test program for the
> xll library that makes using the C API easy and fun.
>
> http://kalx.net/xll/README.htm
>
> Keith A. Lewis | KALX, LLC |http://kalx.net
> 440 Ninth Ave., 8th Floor | New York, NY 10001
> Phone: 212.404.2311 | Fax: 212.404.3228
Hi Keith,
First of all thanks a lot for such a useful information (http://
support.microsoft.com/kb/301443). So it means I can not use COM call
from within an XLL because it may cause some problems.
> What, exactly, do you need to do via a COM interface? You
> might be able to just use Excel4, as blessed by Microsoft.
Actually there are many things which can not be done using Excel4 but
can be easily done using COM interfaces and therefore I wanted to mix
these two thing in a single XLL. some examples are
1. Using Excel4 one can not add list box or a text box to a tool bar.
We can only add buttons to the tool bar using Excel4.
2. Excel 2007 does not provide any API which can be used with Excel4,
for Ribbon UI.
There will be more such advance feature of Excel that can not be used
with XLL and therefore I am worrying to use Excel4 alone in my add-in.
> Let me know if you want to get on the beta test program for the
> xll library that makes using the C API easy and fun.
>
> http://kalx.net/xll/README.htm
Once again Thanks Keith, I would like to give it a try.
Thanks & Regards,
Mousam Dubey
date: Fri, 12 Oct 2007 07:45:43 -0000
author: Mousam
Re: XLL with COM interfaces or automation addin using .NET
Keith is right that there are some imaginative ways of getting round _some_
of the limitations of the C API interface, but, for what it's worth, I think
it's probably best to think of the C API as a tool primarily for developing
fast and flexible worksheet functions. Beyond that, the gulf between what
can be done with the Excel UI and the capabilities of the C API, even with
the "007 enhancements, is growing with every new Excel release. I think in
future developers who want the best of all worlds will be looking at
multi-component solutions to customising Excel, for example, XLL and XLAM.
The work of creating the non-XLL component might well be less than trying
getting the XLL to exceed the C API's limits.
Steve
"Mousam" wrote in message
news:1192175143.013969.20890@v23g2000prn.googlegroups.com...
> On Oct 11, 9:15 pm, "Keith A. Lewis" wrote:
>> "Mousam" wrote in message
>>
>> news:1191950279.668219.259870@r29g2000hsg.googlegroups.com...
>>
>> > Hi,
>> > I am looking to create an add-in for excel (latest versions) what's
>> > the recommended approach?
>>
>> > 1. Create XLL using Excel C API, also use Excel's Com interface from
>> > inside XLL for the tasks that can not be done using Excel C API
>> > (Though I am not sure whether this will work or not)
>> > 2. Excel automation add in using .NET
>>
>> > First thing I want to know is it possible to use COM interfaces inside
>> > XLL? If yes can any one please guide me how can I use COM interfaces
>> > inside XLL?
>>
>> http://support.microsoft.com/kb/301443says not to do this,
>> but it seems to be possible. Steve Dalton describes how to
>> do this in his book _Excel add-in development in C/C++_.
>>
>> > I personally want to go with the 1st approach because of the
>> > performance (speed) of the Excel C API. But at the same time I am
>> > worrying about is there any thing that can be done using 2nd approach
>> > but can not be done using 1st approach?
>>
>> > Please suggest me which approach to follow?
>>
>> What, exactly, do you need to do via a COM interface? You
>> might be able to just use Excel4, as blessed by Microsoft.
>> Let me know if you want to get on the beta test program for the
>> xll library that makes using the C API easy and fun.
>>
>> http://kalx.net/xll/README.htm
>>
>> Keith A. Lewis | KALX, LLC |http://kalx.net
>> 440 Ninth Ave., 8th Floor | New York, NY 10001
>> Phone: 212.404.2311 | Fax: 212.404.3228
>
> Hi Keith,
> First of all thanks a lot for such a useful information (http://
> support.microsoft.com/kb/301443). So it means I can not use COM call
> from within an XLL because it may cause some problems.
>
>> What, exactly, do you need to do via a COM interface? You
>> might be able to just use Excel4, as blessed by Microsoft.
>
> Actually there are many things which can not be done using Excel4 but
> can be easily done using COM interfaces and therefore I wanted to mix
> these two thing in a single XLL. some examples are
>
> 1. Using Excel4 one can not add list box or a text box to a tool bar.
> We can only add buttons to the tool bar using Excel4.
> 2. Excel 2007 does not provide any API which can be used with Excel4,
> for Ribbon UI.
>
> There will be more such advance feature of Excel that can not be used
> with XLL and therefore I am worrying to use Excel4 alone in my add-in.
>
>> Let me know if you want to get on the beta test program for the
>> xll library that makes using the C API easy and fun.
>>
>> http://kalx.net/xll/README.htm
>
> Once again Thanks Keith, I would like to give it a try.
>
> Thanks & Regards,
> Mousam Dubey
>
date: Fri, 12 Oct 2007 09:17:46 +0100
author: Steve Dalton NOsteveSPAM(at)NOeigensysSPAM(dot)com
Re: XLL with COM interfaces or automation addin using .NET
On Oct 12, 1:17 pm, "Steve Dalton"
<NOsteveSPAM(at)NOeigensysSPAM(dot)com> wrote:
> Keith is right that there are some imaginative ways of getting round _some_
> of the limitations of the C API interface, but, for what it's worth, I think
> it's probably best to think of the C API as a tool primarily for developing
> fast and flexible worksheet functions. Beyond that, the gulf between what
> can be done with the Excel UI and the capabilities of the C API, even with
> the "007 enhancements, is growing with every new Excel release. I think in
> future developers who want the best of all worlds will be looking at
> multi-component solutions to customising Excel, for example, XLL and XLAM.
> The work of creating the non-XLL component might well be less than trying
> getting the XLL to exceed the C API's limits.
>
> Steve
>
> "Mousam" wrote in message
>
> news:1192175143.013969.20890@v23g2000prn.googlegroups.com...
>
> > On Oct 11, 9:15 pm, "Keith A. Lewis" wrote:
> >> "Mousam" wrote in message
>
> >>news:1191950279.668219.259870@r29g2000hsg.googlegroups.com...
>
> >> > Hi,
> >> > I am looking to create an add-in for excel (latest versions) what's
> >> > the recommended approach?
>
> >> > 1. Create XLL using Excel C API, also use Excel's Com interface from
> >> > inside XLL for the tasks that can not be done using Excel C API
> >> > (Though I am not sure whether this will work or not)
> >> > 2. Excel automation add in using .NET
>
> >> > First thing I want to know is it possible to use COM interfaces inside
> >> > XLL? If yes can any one please guide me how can I use COM interfaces
> >> > inside XLL?
>
> >>http://support.microsoft.com/kb/301443saysnot to do this,
> >> but it seems to be possible. Steve Dalton describes how to
> >> do this in his book _Excel add-in development in C/C++_.
>
> >> > I personally want to go with the 1st approach because of the
> >> > performance (speed) of the Excel C API. But at the same time I am
> >> > worrying about is there any thing that can be done using 2nd approach
> >> > but can not be done using 1st approach?
>
> >> > Please suggest me which approach to follow?
>
> >> What, exactly, do you need to do via a COM interface? You
> >> might be able to just use Excel4, as blessed by Microsoft.
> >> Let me know if you want to get on the beta test program for the
> >> xll library that makes using the C API easy and fun.
>
> >>http://kalx.net/xll/README.htm
>
> >> Keith A. Lewis | KALX, LLC |http://kalx.net
> >> 440 Ninth Ave., 8th Floor | New York, NY 10001
> >> Phone: 212.404.2311 | Fax: 212.404.3228
>
> > Hi Keith,
> > First of all thanks a lot for such a useful information (http://
> > support.microsoft.com/kb/301443). So it means I can not use COM call
> > from within an XLL because it may cause some problems.
>
> >> What, exactly, do you need to do via a COM interface? You
> >> might be able to just use Excel4, as blessed by Microsoft.
>
> > Actually there are many things which can not be done using Excel4 but
> > can be easily done using COM interfaces and therefore I wanted to mix
> > these two thing in a single XLL. some examples are
>
> > 1. Using Excel4 one can not add list box or a text box to a tool bar.
> > We can only add buttons to the tool bar using Excel4.
> > 2. Excel 2007 does not provide any API which can be used with Excel4,
> > for Ribbon UI.
>
> > There will be more such advance feature of Excel that can not be used
> > with XLL and therefore I am worrying to use Excel4 alone in my add-in.
>
> >> Let me know if you want to get on the beta test program for the
> >> xll library that makes using the C API easy and fun.
>
> >>http://kalx.net/xll/README.htm
>
> > Once again Thanks Keith, I would like to give it a try.
>
> > Thanks & Regards,
> > Mousam Dubey
Hi Keith/Steve,
I am still confused as to which technology to work with for
developing add-in. Actually the add-in I am going to create is a big
add-in which would probably take more than a year to be fully
developed. Therefore I am too much concerned about choosing the right
technology. Following are some broad set of requirements for my add-
in:-
1. Add-in must have some worksheet functions which can be called from
Excel's cell.
2. Add-in will have its own UI elements like toolbars/menus/tools in
existing toolbars/sub menus in existing menus etc.
3. Add-in should be able to set/get information to/from Excel's cell/
worksheet/workbook/chart/pivot table etc.
Considering above requirements which technology you would suggest me
to use? Actually COM technology along with XLL would have solved my
purpose but as MS (http://support.microsoft.com/kb/301443) says not to
do this, this option is already been scoped out.
Now should I move for automation add-ins or can you suggest me about
some technology which can be used along with XLL technology and
fulfill the above requirements.
Eagerly waiting for your precious advice.
Thanks & Regards,
Mousam Dubey
date: Fri, 12 Oct 2007 13:02:24 -0000
author: Mousam
Re: XLL with COM interfaces or automation addin using .NET
Hi Mousam
Advice is a big thing (too much?) to ask for from people who don't work for
the firm that actually produces the software, but for what it's worth here
is my personal perspective on things:
1. Look to the future:
i) MS are unlikely to upgrade the UI capabilities of the C API in the
future, therefore relying on your XLL to customise the Excel UI is a
non-starter.
ii) The UI of Excel has changed dramatically in the 2007 release and is not
going to go backwards, therfore think in terms of 2007 and later versions in
terms of UI customisation. It will be sooner than many might think before
pre-2007 versions are taken seriously as a "must support" criterion.
iii) XLLs appear to be here to stay in the limit role I outlined in my
earlier posting, so a 2007-compatible UI customisation component and an XLL
worksheet function component looks like a reasonably future-proof approach.
2. Be clear about your (end-users') requirements:
i) XLLs bring you worksheet performance
ii) non-XLL add-in components bring you access to the Excel object and its
methods and properties in a way that the C API never will again.
iii) what are the server requirements of your future solutions: what
server-related, web-based functionality do you need to plan for and what
technology is best-placed to provide that.
3
"Mousam" wrote in message
news:1192194144.913408.194440@q3g2000prf.googlegroups.com...
> On Oct 12, 1:17 pm, "Steve Dalton"
> <NOsteveSPAM(at)NOeigensysSPAM(dot)com> wrote:
>> Keith is right that there are some imaginative ways of getting round
>> _some_
>> of the limitations of the C API interface, but, for what it's worth, I
>> think
>> it's probably best to think of the C API as a tool primarily for
>> developing
>> fast and flexible worksheet functions. Beyond that, the gulf between
>> what
>> can be done with the Excel UI and the capabilities of the C API, even
>> with
>> the "007 enhancements, is growing with every new Excel release. I think
>> in
>> future developers who want the best of all worlds will be looking at
>> multi-component solutions to customising Excel, for example, XLL and
>> XLAM.
>> The work of creating the non-XLL component might well be less than trying
>> getting the XLL to exceed the C API's limits.
>>
>> Steve
>>
>> "Mousam" wrote in message
>>
>> news:1192175143.013969.20890@v23g2000prn.googlegroups.com...
>>
>> > On Oct 11, 9:15 pm, "Keith A. Lewis" wrote:
>> >> "Mousam" wrote in message
>>
>> >>news:1191950279.668219.259870@r29g2000hsg.googlegroups.com...
>>
>> >> > Hi,
>> >> > I am looking to create an add-in for excel (latest versions) what's
>> >> > the recommended approach?
>>
>> >> > 1. Create XLL using Excel C API, also use Excel's Com interface from
>> >> > inside XLL for the tasks that can not be done using Excel C API
>> >> > (Though I am not sure whether this will work or not)
>> >> > 2. Excel automation add in using .NET
>>
>> >> > First thing I want to know is it possible to use COM interfaces
>> >> > inside
>> >> > XLL? If yes can any one please guide me how can I use COM interfaces
>> >> > inside XLL?
>>
>> >>http://support.microsoft.com/kb/301443saysnot to do this,
>> >> but it seems to be possible. Steve Dalton describes how to
>> >> do this in his book _Excel add-in development in C/C++_.
>>
>> >> > I personally want to go with the 1st approach because of the
>> >> > performance (speed) of the Excel C API. But at the same time I am
>> >> > worrying about is there any thing that can be done using 2nd
>> >> > approach
>> >> > but can not be done using 1st approach?
>>
>> >> > Please suggest me which approach to follow?
>>
>> >> What, exactly, do you need to do via a COM interface? You
>> >> might be able to just use Excel4, as blessed by Microsoft.
>> >> Let me know if you want to get on the beta test program for the
>> >> xll library that makes using the C API easy and fun.
>>
>> >>http://kalx.net/xll/README.htm
>>
>> >> Keith A. Lewis | KALX, LLC |http://kalx.net
>> >> 440 Ninth Ave., 8th Floor | New York, NY 10001
>> >> Phone: 212.404.2311 | Fax: 212.404.3228
>>
>> > Hi Keith,
>> > First of all thanks a lot for such a useful information (http://
>> > support.microsoft.com/kb/301443). So it means I can not use COM call
>> > from within an XLL because it may cause some problems.
>>
>> >> What, exactly, do you need to do via a COM interface? You
>> >> might be able to just use Excel4, as blessed by Microsoft.
>>
>> > Actually there are many things which can not be done using Excel4 but
>> > can be easily done using COM interfaces and therefore I wanted to mix
>> > these two thing in a single XLL. some examples are
>>
>> > 1. Using Excel4 one can not add list box or a text box to a tool bar.
>> > We can only add buttons to the tool bar using Excel4.
>> > 2. Excel 2007 does not provide any API which can be used with Excel4,
>> > for Ribbon UI.
>>
>> > There will be more such advance feature of Excel that can not be used
>> > with XLL and therefore I am worrying to use Excel4 alone in my add-in.
>>
>> >> Let me know if you want to get on the beta test program for the
>> >> xll library that makes using the C API easy and fun.
>>
>> >>http://kalx.net/xll/README.htm
>>
>> > Once again Thanks Keith, I would like to give it a try.
>>
>> > Thanks & Regards,
>> > Mousam Dubey
>
> Hi Keith/Steve,
> I am still confused as to which technology to work with for
> developing add-in. Actually the add-in I am going to create is a big
> add-in which would probably take more than a year to be fully
> developed. Therefore I am too much concerned about choosing the right
> technology. Following are some broad set of requirements for my add-
> in:-
>
> 1. Add-in must have some worksheet functions which can be called from
> Excel's cell.
> 2. Add-in will have its own UI elements like toolbars/menus/tools in
> existing toolbars/sub menus in existing menus etc.
> 3. Add-in should be able to set/get information to/from Excel's cell/
> worksheet/workbook/chart/pivot table etc.
>
> Considering above requirements which technology you would suggest me
> to use? Actually COM technology along with XLL would have solved my
> purpose but as MS (http://support.microsoft.com/kb/301443) says not to
> do this, this option is already been scoped out.
>
> Now should I move for automation add-ins or can you suggest me about
> some technology which can be used along with XLL technology and
> fulfill the above requirements.
>
> Eagerly waiting for your precious advice.
>
>
> Thanks & Regards,
> Mousam Dubey
>
date: Fri, 12 Oct 2007 16:42:05 +0100
author: Steve Dalton NOsteveSPAM(at)NOeigensysSPAM(dot)com
|
|