Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel book.SaveAs
#4
CSV does not include formulas.

This function is fast.

Member function ExcelSheet.SetCellsFast
Code:
Copy      Help
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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)