In C# can pass this.xlApp.Cells[ nRow, nCol ] = array, how to pass array
values in VFP ?

Currently i loop through the array element and pass array value one by one
into excel cell.

Thanks

Re: how to pass bulk array content to Excel cells ? by Fred

Fred
Thu Feb 09 02:20:31 CST 2006

If your data was in a cursor or table, you could use _VFP.DataToClip() and
then xlApp.Paste() once you've set your starting cell. Don't know of any
special handling for arrays, though.

--
Fred
Microsoft Visual FoxPro MVP


"Tsair" <lstsair@yahoo.com> wrote in message
news:%23w0yCKSLGHA.1180@TK2MSFTNGP09.phx.gbl...
> In C# can pass this.xlApp.Cells[ nRow, nCol ] = array, how to pass array
> values in VFP ?
>
> Currently i loop through the array element and pass array value one by one
> into excel cell.
>
> Thanks
>
>
>



Re: how to pass bulk array content to Excel cells ? by Thierry

Thierry
Thu Feb 09 03:55:41 CST 2006

Hi,

PRIVATE ARRAY YourArray(...)
....
this.xlApp.Cells( nRow, nCol ) = GetArray()

FUNCTION GetArray
RETURN @YourArray
--
Thierry


"Tsair" <lstsair@yahoo.com> a écrit dans le message de news:
%23w0yCKSLGHA.1180@TK2MSFTNGP09.phx.gbl...
> In C# can pass this.xlApp.Cells[ nRow, nCol ] = array, how to pass array
> values in VFP ?
>
> Currently i loop through the array element and pass array value one by one
> into excel cell.
>
> Thanks
>
>
>



Re: how to pass bulk array content to Excel cells ? by Tsair

Tsair
Thu Feb 09 12:15:48 CST 2006

Thank Fred

"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:eBvKyGVLGHA.3936@TK2MSFTNGP12.phx.gbl...
> If your data was in a cursor or table, you could use _VFP.DataToClip() and
> then xlApp.Paste() once you've set your starting cell. Don't know of any
> special handling for arrays, though.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Tsair" <lstsair@yahoo.com> wrote in message
> news:%23w0yCKSLGHA.1180@TK2MSFTNGP09.phx.gbl...
>> In C# can pass this.xlApp.Cells[ nRow, nCol ] = array, how to pass array
>> values in VFP ?
>>
>> Currently i loop through the array element and pass array value one by
>> one into excel cell.
>>
>> Thanks
>>
>>
>>
>
>



Re: how to pass bulk array content to Excel cells ? by Tsair

Tsair
Thu Feb 09 12:16:43 CST 2006

Thank Thierry,

I follow your method, the array only return the first element value into
excel cell.


"Thierry" <tper_NOSPAM@vfemail.net> wrote in message
news:OAhya6VLGHA.648@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> PRIVATE ARRAY YourArray(...)
> ....
> this.xlApp.Cells( nRow, nCol ) = GetArray()
>
> FUNCTION GetArray
> RETURN @YourArray
> --
> Thierry
>
>
> "Tsair" <lstsair@yahoo.com> a écrit dans le message de news:
> %23w0yCKSLGHA.1180@TK2MSFTNGP09.phx.gbl...
>> In C# can pass this.xlApp.Cells[ nRow, nCol ] = array, how to pass array
>> values in VFP ?
>>
>> Currently i loop through the array element and pass array value one by
>> one into excel cell.
>>
>> Thanks
>>
>>
>>
>
>



Re: how to pass bulk array content to Excel cells ? by Thierry

Thierry
Fri Feb 10 05:48:46 CST 2006

The complete solution is :

WITH oWorkSheet
.range(.cells(1,1),.cells(alen(YourArray,1),alen(YourArray,2))).value =
GetArray()
ENDWITH

--
Thierry


"Tsair" <lstsair@yahoo.com> a écrit dans le message de news:
ORZqYreLGHA.3860@TK2MSFTNGP12.phx.gbl...
> Thank Thierry,
>
> I follow your method, the array only return the first element value into
> excel cell.
>
>
> "Thierry" <tper_NOSPAM@vfemail.net> wrote in message
> news:OAhya6VLGHA.648@TK2MSFTNGP14.phx.gbl...
>> Hi,
>>
>> PRIVATE ARRAY YourArray(...)
>> ....
>> this.xlApp.Cells( nRow, nCol ) = GetArray()
>>
>> FUNCTION GetArray
>> RETURN @YourArray
>> --
>> Thierry
>>
>>
>> "Tsair" <lstsair@yahoo.com> a écrit dans le message de news:
>> %23w0yCKSLGHA.1180@TK2MSFTNGP09.phx.gbl...
>>> In C# can pass this.xlApp.Cells[ nRow, nCol ] = array, how to pass array
>>> values in VFP ?
>>>
>>> Currently i loop through the array element and pass array value one by
>>> one into excel cell.
>>>
>>> Thanks
>>>
>>>
>>>
>>
>>
>
>