Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Excel
123quattro
charting
crashesgpfs
datamap
excel
interopoledde
links
misc
newusers
printing
programming
querydao
sdk
setup
templates
worksheet.functions
  
 
date: Wed, 11 Jun 2008 13:31:22 +0800,    group: microsoft.public.excel.sdk        back       


To get value of cell range.   
Hi,

I am working on excell Add-in in c++.

Say for example...I have following function..

LPXLOPER __stdcall setOrcYieldCurve(LPSTR yieldCurveName, LPSTR ccy, 
LPXLOPER sourceCellRange)
{

  return NULL;

}

I want go get value of each and every cell of "sourceCellRange".

Could any one help me?

Thanks in advance.

Regards,
Sunil Adhyaru.

url:http://www.ureader.com/gp/1039-1.aspx
date: Wed, 11 Jun 2008 13:31:22 +0800   author:   suniladhyaru

Re: To get value of cell range.   
The answer depends on how you are registering your function.  If the 3rd 
argument is registered as type R then a range reference in the spreadsheet 
will be passed to you as is, (i.e. either xltypeRef or xltypeSRef) and you 
will have to convert it to an array-type XLOPER (xltypeMulti) using 
xlCoerce.  If you register the argument as type P then Excel will convert a 
passed-in reference to an xltypeMulti for you.  (In either case you should 
check that you were not passed an inappropriate argument type, or one that 
your code could not deal with).

Once you have an xltypeMulti XLOPER to deal with, you only need to iterate 
through the row-major array of XLOPERs and retrieve their values according 
to each element's type.

Regards

Steve Dalton


"suniladhyaru"  wrote in message 
news:5f05720214ae4dfd856da2119bb22228@newspe.com...
> Hi,
>
> I am working on excell Add-in in c++.
>
> Say for example...I have following function..
>
> LPXLOPER __stdcall setOrcYieldCurve(LPSTR yieldCurveName, LPSTR ccy,
> LPXLOPER sourceCellRange)
> {
>
>  return NULL;
>
> }
>
> I want go get value of each and every cell of "sourceCellRange".
>
> Could any one help me?
>
> Thanks in advance.
>
> Regards,
> Sunil Adhyaru.
>
> url:http://www.ureader.com/gp/1039-1.aspx
date: Thu, 3 Jul 2008 19:36:56 +0100   author:   Steve Dalton NOsteveSPAM(at)NOeigensysSPAM(dot)com

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us