Assign an array to a range how it is possible?

Questions and answers on how to use XLSSpreadSheet.
Post Reply
Raouf
Posts: 1
Joined: Sat Jan 22, 2011 7:26 am

Assign an array to a range how it is possible?

Post 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
Post Reply