Q: How to fill an excel sheet with data from tcl using DDE

Hi All,

Already figured out how to:

dde execute excel system {[New(1)]}

but using:

for {set row 1} {$row<10} {incr row} {

for {set col 1} {$col<10} {inc col} {

set cmd "\[Formula(\"[expr $row*$col]\",\"R${row}C${col}\")\]"

puts $cmd

dde execute excel system $cmd

}

Quote:

}

aborts at row 3 with console output:

[Formula("1","R1C1")]

[Formula("2","R1C2")]

[Formula("3","R1C3")]

[Formula("4","R1C4")]

[Formula("5","R1C5")]

[Formula("6","R1C6")]

[Formula("7","R1C7")]

[Formula("8","R1C8")]

[Formula("9","R1C9")]

[Formula("2","R2C1")]

[Formula("4","R2C2")]

[Formula("6","R2C3")]

[Formula("8","R2C4")]

[Formula("10","R2C5")]

[Formula("12","R2C6")]

[Formula("14","R2C7")]

[Formula("16","R2C8")]

[Formula("18","R2C9")]

[Formula("3","R3C1")]

remote server cannot handle this command

Any clues? I guess it's kind of slow any way, suggestions?

TIA

Johan Knol