Page 1 of 1

Assign an array to a range how it is possible?

Posted: Sat Jan 22, 2011 8:22 am
by Raouf
Hi there,
I am new to xlsReadWrite and I need to know how to assign array values to a specific range? below is how to do it in excel from Delphi of course,

....
var myRangeArray: variant;
myVluesArray: array of string;
begin
....
myRangeArray:= VarArrayCreate([0,Length(myValuesArray)], varVariant); //myRangeArray will be assigned to a specific xl range;
myRangeArray:= myValuesArray; // myValuesArray contains the data to be assigned to xl Range
myXlRange.Cells:= myRangeArray;
....
end

Thanks in advance,
Raouf