Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to run the marco in excel sheet using tcl

Status
Not open for further replies.

jloh81

Programmer
Jun 15, 2010
16
US
Hi,
I am trying to run the marco in the excel sheet using TCL script.

Below code is trying to open multiple csv file and run the marco to combine the 2 csv file into one excel sheet

package require tcom

set excel [::tcom::ref createobj Excel.Application]

set workbooks [$excel Workbooks]

set workbook [$workbooks Open book1.csv book2.csv]

$excel Run marco1

$workbook SaveAs book2.excel

BUT, when i run this script, it cannot find package require tcom.
Please advice
 
tcom could be installed using teacup:
Code:
teacup install tcom
 
hi mikrom,

what is it means? Is it mean that i need to install the tcom?

what is means by teacup install tcom?

I am new to tcl script.
 
You have written that "it cannot find package require tcom", therefore I think that your Tcl installation doesn't contain the package tcom.

I'm using ActiveTcl 8.5, which doesn't contain tcom by default and so to access a database using ADO I had to install it first, ... and I installed it with method above. It's the command, which you should write on command line and then press enter.

Read here about teacup:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top