Spread Data to Cells

Jan 7, 2013 at 10:19 AM

Hi Keith,

How can i spread data to some cells? 

In VBA i would write something like:

For i = 1 to UBOUND(vArray)

Cells(i, 1).Value = vArray(i);

Next i

Do you have some samples to achieve that using your Add In?

Appreciate your help.

Thanks

Coordinator
Jan 7, 2013 at 10:43 AM

You can do this without looping using xlSet.

ExcelX(xlSet, OPERX(0,0, o.rows(), o.columns()), o);

where o is a range containg the data. This will paste to the range having A1 as the upper left corner.

It is more in keeping with the zen of Excel to use array functions. If you are using numerical data, the FP data type gives you the highest possible performance. This is something not available from VBA. See http://nxll.codeplex.com/wikipage?title=FP.

Jan 8, 2013 at 4:34 AM

Works as expected. Thanks.

seems ExcelIx function can manipulate excel object like apply style, set calculation manual / auto etc.

Is there a documentation for ExcelIx function parameters? need to know what parameters required to do certain action. say ExcelX(xlcApplyStyle, ??).

ExcelX