Defining custom formula for Excel

Tech-Archive recommends: Speed Up your PC by fixing your registry



--- 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




.



Relevant Pages

  • Re: Placing triangle symbols WITHIN cell for significance testing
    ... The following chrw codes in VBA worked great for me. ... The help file for "Insert a symbol" in excel XP says ... > not unicode enabled, and will only accept values 1 to 255. ...
    (microsoft.public.excel.programming)
  • Unicode/utf-8 data in SQL Server
    ... I'm working with a MS SQL Server database created by a program from a ... fine US company who seems to have gotten run over by the Unicode truck. ... file created from a report to import in Excel and is getting an ... the database, accumulate the entire result text as a big unicode string ...
    (comp.lang.python)
  • Re: BOM and Unicode CSVs
    ... Excel does not interpret a BOM any further then to see ... if the file is unicode or not. ... Excel saves CSV files with localized separators and number ... > I am currently exporting data to a CSV file so to be viewed by Excel. ...
    (microsoft.public.excel.programming)
  • Re: A question on Encoding and Decoding.
    ... Note that python2xlw is *NOT* intended to be a general-purpose Excel ... Can create data sheets and Scatter Charts from the data sheets. ... The notes on Unicode in the xlrd documentation? ...
    (comp.lang.python)
  • Defining custom formula for Excel
    ... I'd like to write a custom function for Excel, ... (The function will get two real arrays as input and will return three real ... it seems to me that the C API has one problem: ... Italian - I had no problem before I learnt about Unicode), ...
    (microsoft.public.vc.mfc)