Defining custom formula for Excel
- From: "Giovanni Dicanio" <giovanni.dicanio@xxxxxxxxxx>
- Date: Thu, 23 Aug 2007 13:29:06 +0200
--- Already posted to the MFC newsgroup, but I would also use ATL for the
COM implementation, so I post here, too; thanks ---
Hello,
I'd like to write a custom function for Excel, using C++.
(The function will get two real arrays as input and will return three real
arrays as output.)
I did some research and found that Excel exposes a C API (maybe this
predates COM and OLE...). I've also found an open-source C++ wrapper to
Excel C API ("Excel 32 C++ Wrapper"):
http://xlw.sourceforge.net/html/index.html
it seems an easy interface to program...
However, it seems to me that the C API has one problem: every string is
ANSI, no Unicode. It is bad e.g. for function and function parameters
descriptions. While using ANSI is fine for English text (and maybe also for
Italian - I had no problem before I learnt about Unicode), this won't scale
up to other languages.
Or maybe I'm missing something, and is it possible to pass Unicode strings
using the Excel C API?
Moreover, is it possible to define custom functions for Excel using COM? Do
you have any links about it?
(I believe that I won't have any problems with Unicode and Excel/COM,
beacuse COM strings do use Unicode.)
Finally, between Excel C API and Excel COM, which approach has best
performances?
Thanks in advance,
Giovanni
.
- Follow-Ups:
- Re: Defining custom formula for Excel
- From: Brian Muth
- Re: Defining custom formula for Excel
- Prev by Date: Re: DCOM :Access Denied error
- Next by Date: Re: Defining custom formula for Excel
- Previous by thread: Re: DCOM :Access Denied error
- Next by thread: Re: Defining custom formula for Excel
- Index(es):
Relevant Pages
|