Q: How to fill an excel sheet with data from tcl using DDE 
Author Message
 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



Mon, 22 Oct 2001 03:00:00 GMT  
 Q: How to fill an excel sheet with data from tcl using DDE
What is this DDE you are using?  It sounds like you are doing something that
I desperately need.  I've just been saving the data to a text file, then
opening excel to use the file.
Jeff Gosnell
Quote:

>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
>    }
>}

>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



Mon, 22 Oct 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to fill an Excel sheet from TCL using DDE (and clipboard), any better ideas?

2. DDE - Create new sheets in Excel

3. How to make a certain work sheet in Excel active with DDE

4. writing data to different sheets within the same Excel file

5. how to specify the excel sheet you wanted while using Active X

6. Filling listbox with data from Text or Excel file

7. Returning data from Excel with DDE

8. dde requesting data from excel spreadsheet?

9. Using Excel with DDE

10. Reading/Writing from/to Excel/Word using DDE (PLEASE HELP)

11. Using DDE:s CW / Excel

12. How uses DDE in C5 PE with Microsoft Office 97 Excel

 

 
Powered by phpBB® Forum Software