Subject: TCOM: how to access Excell worksheets with tcom - DN [1]
"Stefan Koch" <st.koch@pop.agri.ch> - 24 Oct 1999 - comp.lang.tcl
Hi
I have been experimenting with tcom. So far I was able to access a table
within a worksheet. It works ok as long as I know the name of a worksheet.
But: how can I access a worksheet without knowing the name of it?
In the exampe bellow the command [$tab2 Name] returns the name of the
worksheet (which may be modified by the user). The command [$tab2 CodeName]
returns the internal table name. All I want is to acces the table trough the
internal name or to receive a list of table names within a worksheet
appreciate your help
Stefan
Example:
set application [::tcom::bind "Excel.Application"]
$application Visible 1
set workbooks [$application Workbooks]
# open xls file
set workbook [$workbooks Open {c:\test.xls}]
set worksheets [$workbook Worksheets]
# get access to table sheet 2
set tab2 [$worksheets Item "Table2"]
Last modified
1999-11-04
1999-11-04
(195.108.246.50)
Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated
