11-02-2010, 08:40 AM
CSV does not include formulas.
This function is fast.
Member function ExcelSheet.SetCellsFast
This function is fast.
Member function ExcelSheet.SetCellsFast
function ARRAY(str)&a $range ;;range example: F"A1:C{a.len}", press F1 to see more.
;Populates part of worksheet with data from two-dimensional array.
;range examples: "" (used range), "sel" (selection in active sheet), "A1:C3" (range), "A:C" (columns A, B and C), "3:3" (row 3), "A1" (cell), "Named" (named range)
;EXAMPLE
;;/exe 1
;ARRAY(str) a.create(2 100)
;for(_i 0 a.len) a[0 _i]=_i; a[1 _i]=10*_i
;
;ExcelSheet es.Init
;es.SetCellsFast(a F"A1:B{a.len}")
if(!ws) Init
int i j nr nc
Excel.Range r
GetRange(range r nr nc)
ARRAY(VARIANT) av.create(a.len a.len(1))
for i 0 a.len
,for j 0 a.len(1)
,,av[i j]=a[j i]
r.Value=av
err+ E