Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default cant pass array to excel from c++ using xloper structure

i tried a lot to pass array to excel sheet using xloper structure hear is
sample function i wrote to pass array using xloper

__declspec(dllexport) LPXLOPER xarr ()
{

static XLOPER xlArray;
XLOPER xlValues[4];
int i;
for (i = 0; i < 4; ++i)
{
carr[i]=i*2;
xlValues[i].val.num = i+10;
xlValues[i].xltype = xltypeNum;
}
//this will generate array with 4 element 10,11,12,13

xlArray.xltype = xltypeMulti;
xlArray.val.array.lparray = &xlValues;
xlArray.val.array.rows = 1;
xlArray.val.array.columns = 4;
return (LPXLOPER) &xlArray;
}

above function gives only first value of array i.e.10 in the cell from which
function call is made
is there is any way to fill the other cell? as i am giving no of row and
column in xloper it should fill 4 cell but that is not happening


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
excel outlines structure meghnal Excel Discussion (Misc queries) 3 June 27th 09 07:28 AM
combining cells and array from different sheets into an array to pass to IRR() [email protected] Excel Discussion (Misc queries) 3 September 11th 06 07:17 AM
can excel links be somehow relative to folder structure? Paul134 Excel Discussion (Misc queries) 0 March 2nd 06 03:22 PM
warning: cannot change part of an array. how do I by pass this? Gwyneth Excel Worksheet Functions 3 December 8th 05 11:17 AM
Pass an array to Rank Biff Excel Worksheet Functions 12 June 29th 05 04:15 PM


All times are GMT +1. The time now is 06:57 AM.

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

About Us

"It's about Microsoft Excel"