Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Worksheet function - array result, C++

Hi All,

I'd like to use C++ to:
1. Write addin which exposes function available from worksheet
2. Function has one parameter which is a query to database returning data
(size of data in unknown until query is launched)
3. Insert result into cells.

I've been trying with Excel and COM addins and I can't write results to
cells when I call function. The problem doesn't exists when it is a macro.
Then I can write to any cell on the sheet.

Is it possible to handle it in a different way?

Any help would be much appreciated.

Thanks
Kamil.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Worksheet function - array result, C++

Functions can only return results to the cells they occupy:
If you array-enter (Control-Shift-Enter) a Function into multiple cells then
the function can return an array of values to those cells.

Otherwise you have to use a Sub called from an event.


--
Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com


"kamil jaskiewicz" wrote in
message ...
Hi All,

I'd like to use C++ to:
1. Write addin which exposes function available from worksheet
2. Function has one parameter which is a query to database returning data
(size of data in unknown until query is launched)
3. Insert result into cells.

I've been trying with Excel and COM addins and I can't write results to
cells when I call function. The problem doesn't exists when it is a macro.
Then I can write to any cell on the sheet.

Is it possible to handle it in a different way?

Any help would be much appreciated.

Thanks
Kamil.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Worksheet function - array result, C++

Thanks Charles,

I don't want to use array formulas because it is not convenient way (you
don't know what range you have to select). I'll try with events.

"Charles Williams" wrote:

Functions can only return results to the cells they occupy:
If you array-enter (Control-Shift-Enter) a Function into multiple cells then
the function can return an array of values to those cells.

Otherwise you have to use a Sub called from an event.


--
Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-Array Function result in non-accurate values Salman Excel Discussion (Misc queries) 1 April 11th 07 07:00 AM
Non-Array Function result in non-accurate values Salman Excel Worksheet Functions 0 April 10th 07 08:04 AM
query result through array on worksheet Ozz Excel Programming 1 July 3rd 06 08:17 PM
Using address function result in an array RLR Excel Worksheet Functions 3 May 9th 06 03:21 AM
function array result - .xll - sdk - XLOPER - example code? Kevin Love Excel Programming 0 August 30th 03 01:24 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"