f

#### How to read an Excel file using TCL Scripts

Hi all,

I have an excel file test.xls.It is created manually and few values

I Want to read each column of the excel and store in some variable
using TCL Scripts.

I went thro lot of examples but nothing related to above requirement I
found.

RAGHU

 0
raghudr (6)
11/25/2009 9:55:34 AM
comp.lang.tcl 23429 articles. 2 followers.

6 Replies
11884 Views

Similar Articles

[PageSpeed] 50

On 25 =D0=BD=D0=BE=D1=8F, 12:55, RAGHU <ragh...@gmail.com> wrote:

> I Want to read each column of the excel and store in some variable
> using TCL Scripts.

Open http://wiki.tcl.tk/tcom and search for "Extract some cells from
an Excel file".

 0
Konstantin
11/25/2009 1:05:59 PM
On 25 Nov., 10:55, RAGHU <ragh...@gmail.com> wrote:
> Hi all,
>
> I have an excel file test.xls.It is created manually and few values
>
> I Want to read each column of the excel and store in some variable
> using TCL Scripts.
>
> I went thro lot of examples but nothing related to above requirement I
> found.
>
>
> RAGHU

This question was here 1 or two months ago. Check the mailing list or
search in the wiki.

 6
hae
11/25/2009 4:57:55 PM
hi Raghu,

Save the excel file into csv format... thsi will then give you a comma separated values... since it is separated by comma you can use the tcl comman to "split". split "\n" string  to split per row.. split "," string to split per column.. 
 0
balejo (1)
2/1/2014 10:58:18 AM
At Sat, 01 Feb 2014 04:58:18 -0600 balejo <bryan.alejo@bitmicro.com> wrote:

>
> hi Raghu,
>
> Save the excel file into csv format... thsi will then give you a comma separated values... since it is separated by comma you can use the tcl comman to "split". split "\n" string  to split per row.. split "," string to split per column..
>
>

There are also packages in Tcllib for dealing with csv files, including a
parser than understands about escaping and quoting.

man n csv
man n matrix

>
>

--
Robert Heller             -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


 0
Robert
2/1/2014 2:15:22 PM
On Wednesday, November 25, 2009 3:55:34 AM UTC-6, RAGHU wrote:
> Hi all,
>
> I have an excel file test.xls.It is created manually and few values
>
> I Want to read each column of the excel and store in some variable
> using TCL Scripts.
>
> I went thro lot of examples but nothing related to above requirement I
> found.
>
>
> RAGHU

Here's an extension built on Twapi - complete with examples.

http://www.posoft.de/html/extCawt.html

 0
JMarkCase
2/1/2014 3:26:15 PM
balejo <bryan.alejo@bitmicro.com> wrote:
: hi Raghu,

: Save the excel file into csv format... thsi will then give you a
: comma separated values... since it is separated by comma you can use
: the tcl comman to "split". split "\n" string to split per row.. split
: "," string to split per column..

You are better off using the Tcllib csv command to process the csv
file.  There are a bunch of odd quirks that make the basic split
command fail for different quirks.

http://tcllib.sourceforge.net/doc/csv.html


 0
Rich
2/1/2014 11:15:46 PM

Similar Artilces:

How to read a file using TCL
Hi, I am a new bee to TCL. I want to write a script that opens the file and reads it and prints to screen. I have tried the below. But doesn't works. set INFILE [open "temp" a+] set data [read $INFILE] set data [split$data "\n"] foreach line $data { puts$line } -Regards Swaroop Kumar Tata On 14 Mai, 10:39, Swaroop <swaroop.t...@gmail.com> wrote: > Hi, > I am a new bee to TCL. I want to write a script that opens the > file and reads it and prints to screen. I have tried the below. But > doesn't works. > > set INF...

upload ".zip" file [transfer files using tcl script]
I want to upload .zip file from my windows box to unix box i mean i want to transfer files using tcl script. Thanks in advance file transfer protocol - ftp - is the protocol of choice. A wiki page "Simple ftp uploader" shows an example using the ftp package. May I suggest to access the wiki page per http://taipu.de/ida.htm, to get pointed to the wiki page http://wiki.tcl.tk/1502 with minimal typing effort? best regards, Roland Frank senthilvaishnavi schrieb: > I want to upload .zip file from my windows box to unix box i mean i > want to transfer files using...

Dose there any tcl script to translate an file with embedded tcl
Hi I need to generate some big file, but there are rules for generate these files Ex . ============================== Start input a [0] wire input a [1] wire .. .. .. .. input a [1000] wire End ================================= Dose there any tcl script can help to translate a file with embedded tcl script into a new file For example this is a source file ======================== Start * set i 0 * for { set i 0 } { $i < 1000 } { incr i } { * puts input a [$i] wire * } End ========================== After Translate ======================= Start input a [0] wire input a [1] wire .. .. ...

Sourcing a TCL file from within a tcl file
I am a newbie which I am sure I don't need to state :) I am trying to create a variable with a TCL file that will source another tcl file when I type the variable name something like this if I enter A through my keyboard then source a.tcl Can someone show me how to do this thanks guy On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > I am a newbie which I am sure I don't need to state :) > > I am trying to create a variable with a TCL file that will source > another tcl file when I type the variable name > > something like this > > if I e...

read excel file from tcl in li
Hi everyone i wonder if anybody know if there is anyway to read excel file from tcl in linux? as tcom work only in windows Thanks in advance. On Jan 22, 2:03=A0pm, "m.gad" <mohamedsami...@gmail.com> wrote: > Hi everyone > > i wonder if anybody know if there is anyway to read excel file from > tcl in linux? > > as tcom work only in windows > > Thanks in advance. There is a small command-line tool "xls2csv" (in the catdoc package IIRC) which will convert what can be to CSV. Of course you'll lose Excel-specific metainformation. (Beware, t...

Why can execution results in tcl shell differ than if using tcl script??

read excel file using java script
any one suggest a way to read the excel file from a java script code.. (should not use any html) On Mon, 6 Jul 2015 22:25:02 -0700 (PDT), Shankara Subramanian wrote: >any one suggest a way to read the excel file from a java script code.. (should not use any html) You would have to rewrite a good part of Excel in JavaScript. A couple of years of work, perhaps? It may be easier just to pick strings from the Excel file, but you would not get the whole structure that way. The easiest way would be to export the data from Excel in a format that is much easier to handle, such a...

Does anyone have a Tcl Script which does a Multi Part File Upload to web site ( TCL CGI )
Hello all, I am after a Tcl script which I can use on my apache Linux server which a user can upload files or pictures to the site with ... Any help is appreciated, Thank you for the help, Sean - HeliHobby.com Sean wrote: > Hello all, > > I am after a Tcl script which I can use on my apache Linux server > which a user can upload files or pictures to the site with ... > > Any help is appreciated, > > Thank you for the help, > > Sean - HeliHobby.com I use ncgi for ths (from tcllib). It rocks! high quality code that never fails. For instance the file upload...

Problem using grep command in tcl and reading multiple files
Hi All, I am a newbie to tcl and i am having problem performing some of basic operations using tcl. I am having a centralized location in server where i am large number of directories with all user logins and each directory is having some log files with *.log extension. My requirement is to identify directories with my login id and then go into each directory and append all the information available in *.log files into one file. Problem 1: For identifying directory name with my login, i am using exec ls | grep <USERNAME> But it is returning "child process exited abnormally&quo...

new bie question about writing excel file with tcl script?
Hi Members, i need some procedures and suggestions regarding,writing excel format file with tcl. what i am trying to do is read multiple files of .txt format of specific name in directory and trying to compare the data in each file with other data and display the results in the form of tables . is there any tcl example scripts that writes excel format, are available? can any one give me some suggestions regarding,how to search for specific file and to write an excel format with tcl. thanks In article <83ef457f-b378-4e86-bcf2-cfb3678c1300@e25g2000prg.googlegroups.com>, raaki <...

l'C program executing from a tcl script with pipe opened using open command in Tcl
Hi all, I wanted to communicate with a C program from a Tcl script.. The test code i have written is below Both the 'C' program and Tcl script are located in the same directory. The 'C' program is below. I have named it CTCL.C #include<stdio.h> #include<string.h> int main() { int i; char c[30]; printf("Reading..."); scanf("%s",c); printf("String read is :%s\n",c); fflush(stdout); return 0; } I have compiled the program with the command cc CTCL.C -o ctcl So the executable was generated with the name 'ctcl' The Tcl script...

How can I use tcl to read files written in GBK or GB18030 encoding?
I know that Tcl has quite a large list of encodings that it supports. However, I've a request for guidance by someone who needs to read files using either GBK or GB18030 (I think these are alternate names for the same encoding...). Has anyone worked out what one needs to do for this? On 31 Jan., 16:26, "Larry W. Virden" <lvir...@gmail.com> wrote: > I know that Tcl has quite a large list of encodings that it supports. > However, I've a request for guidance by someone who needs to read > files using either GBK or GB18030 (I think these are alternate names >...

Using "Open with" in windows to process a file with a tcl/tk scripts?
I have the following problem in windows 2000. I have written a TCL/TK script which process xml files. Now I will like to be able select the xml file using the windows file manager and use "open with" to startup the tcl/tk scripts and pass the xml file as argument. When I do this now I get an error telling that the xml file is not a valid win32 application. Any ideas of how to do this? Thanks in advance Hello, You should enter something similar to: c:\path\to\wish.exe "C:\path\to\xmleditor.tcl" "%1" Regards, -- Ramon Rib� http://gatxan.cimne.u...

How tosource sh script/setup file from tcl script?
I have a tcl script that generates sh command file that looks like this: setenv var1 value1 setenv var2 value2 etc. i would like to source so all the variables will be set to the terminal window. any idea's? i've tried >exec source my_command_file but it seems that tcl has "source" command as well and its not working... Thanks, G On Thursday, July 31, 2014 1:22:19 PM UTC+2, Guy wrote: > I have a tcl script that generates sh command file that looks like this: >=20 > setenv var1 value1 > setenv var2 value2 >=20 > i would like to s...

how to read file in tcl
in the condition that giving some coordinate of polygon in a directory and i have to read these file without using the command create poly how to call these file from the directory? In article <36940419.0308110031.66a5cd1@posting.google.com>, K Zewi <prowarcraftplayer@yahoo.com> wrote: >in the condition that >giving some coordinate of polygon >in a directory and i have to >read these file without using >the command create poly >how to call these file >from the directory? Did you ever get the help you sought? My guess is that readers found your question...

tcl script from excel
hi could we generate tcl script from the excel file. if we can do this let me know the ideas. your help is much more apprecited On 2014-11-09, yenilsuwal@gmail.com <yenilsuwal@gmail.com> wrote: > hi could we generate tcl script from the excel file. if we can do this > let me know the ideas. your help is much more apprecited I have generated Tcl in an Excel spreadsheet, it's just a matter of writing a cell formula to generate the desired Tcl command. I copied the formula down the column so that each row generated a command, then copied the cells (part of a column), p...

how to read or call a file in tcl ? davidw@dedasys.com (David N. Welton) wrote in message news:<873cg837s7.fsf@dedasys.com>... > prowarcraftplayer@yahoo.com (K Zewi) writes: > > > how to read or call a file in tcl ? > > 'call' a file? > > Reading a file can be done with the 'read' command: > > set fl [open "somefile"] > set data [read $fl] > > is a simple way to do it. You want to look at the documents for those > commands, and maybe 'fconfigure' if you want to read a binary file. i still can't read ... Reading an Excel .xls File without using Excel.Application? Hi all, My VB6 app needs to be able to read from an Excel .xls file. However, the target computer won't have Excel installed. All the online examples I've found for reading Excel files assume you're doing this... Dim xl As Excel.Application Dim xlsheet As Excel.Worksheet Dim xlwbook As Excel.Workbook ...which obviously won't work. How else can I go about it? Or, what's the bare minimum I could install to get this functionality? Thanks, Leif -- Leif Bloomquist leif(at)schemafactor(dot)com http://home.ica.net/~leifb/ "Once secure, saturate the area with pl... How to read in all excel files from a excel file folder Hello! I#ve one question. I want to read in all excel files from a file folder into matlab. How can i create a m.file witch reads in all my excel files????? thx i first get all files into a variable: FileNames=dir('*.xls'); then crate a loop to open each excelfile: for i=1:size(FileNames,1) A=xlsread(Filenames(i,1).name; end good luck Iris E.. wrote: > > > Hello! > > I#ve one question. I want to read in all excel files from a file > folder into matlab. > How can i create a m.file witch reads in all my excel files????? > > thx > i ... wrong file size when saving an sqlite blob to a file using tcl Hello Group, I hope you can give me some pointers in solving the next problem: Using a tcl script, I read an MSAccess mdb file into a tcl variable (using [fconfigure$f -translation binary] and [read]). Then I inserted the data in an sqlite blob field. (using an sql insert statement and tdbc::sqlite3). I retrieved the mdb back to the file system using two methods: (1) saving the blob using an option in SQLlite Manager (http://code.google.com/p/sqlite-manager/) (2) using tcl: set outfh [open C:/testmdb.mdb w+] fconfigure $outfh -translation binary$db_n...

Using TCL files in Python ?
I am reasonably new to programming in Python. [Using LINUX] Up until now I have been using GUI widgets supplied by 'Tkinter' but starting to realise that Tkinter have limited widgets. I have been given the lead that I should look at other sources for GUI widgets - namely TCL. I have just done a search for 'tcl' files on my 'Fedora 3' installation and find I have available: Tix8.1 Tcl8.4 Tk8.4 I have never used TCL code under Python so I assume I can use widgets from any of these providers ? Where is a good resource I can use to help understand how to use TCL...

read an XML file in TCL
Hello I am looking to read an XML file into my TCL program and extract information. How do we read an XML file in TCL? Are there man pages that describe these? Thanks krithiga one way is: http://wiki.tcl.tk/tdom another (and faster, but should be used only for valid stuff) is http://wiki.tcl.tk/11020 Torsten Edler wrote: > another (and faster, but should be used only for valid stuff) is > I'm curious as to this assertion that the shallow regexp parser is faster than tdom, I would have expected things to be the other way around. Do you have a benchmark? Were you testing...

Reading a tcl file in C
I have a tcl configure file (a list of variables with values and comments) that I wish to read into an array in C (or better yet, Objective-C). Does anyone have any suggestions of how to do this, or have any public-domain or GPL code that does this? randall.h.wood@gmail.com wrote: > I have a tcl configure file (a list of variables with values and > comments) that I wish to read into an array in C (or better yet, > Objective-C). Does anyone have any suggestions of how to do this, or > have any public-domain or GPL code that does this? Can you give us a short example of what this ...

In Tcl and C++ code, how to use Tcl Command, such as exit?
In my code, i used Tcl_SetStdChannel(0, STDIN) and a thread to control all input and output from Tcl, but i want to use some of Tcl' Commands, such as, exit. I used Tcl_Eval() then, but the Tcl command seem invisible in my code, I typed a string in command prompt, such as "AAAAA", and Enter, got nothing feedback. How can i do to get these Tcl Commands work? Thanx! vian1381@china.com.cn wrote: > In my code, i used Tcl_SetStdChannel(0, STDIN) and a thread to control > all input and output from Tcl, but i want to use some of Tcl' Commands, > such as, exit. > &g...

Web resources about - How to read an Excel file using TCL Scripts - comp.lang.tcl

Script (typefaces) - Wikipedia, the free encyclopedia
Casual scripts show a less formal, more active hand. The strokes may vary in width but often appear to have been created by wet brush rather ...

Super Tuesday played according to script - now everything changes
Hillary Clinton can now position herself as the grown-up in the room for the general election, while Donald Trump is setting himself up for a ...

Tim Cook goes off-script describing FBI iPhone backdoor request as 'cancer'
Say what you like about Apple, one thing is for sure it is one of the most scripted and tightly-controlled companies in existence. Everything ...

I’ve Just Read The Pilot Script To DC Comics And NBC’s New Comedy, Powerless (UPDATE)
Emily, Del, Jackie, Teddy... UPDATE: Script scans excerpts removed, at the request of Asad Kazi of Warner Bros. Entertainment Inc. So that's ...

Chewbacca actor to tweet original 'Star Wars' script, hints at epic news
Peter Mayhew has Twitter all aflutter, saying he'll share pages of an early draft of the first film a little at a time and then make a "big announcement." ...

John Scott’s Hockey ‘Rocky’ Tale Nets Movie Deal: Mitch Albom To Script All-Star MVP’s Story For Mandalay ...
EXCLUSIVE : Mandalay Sports Media has acquired the feature life rights to tell the story of John Scott , a journeyman player who: was voted into ...

Dope Scenes Ben Affleck Probably Added To The Batman v Superman Script
... of the upcoming film Batman v Superman: Dawn of Justice , spent some time during the shooting of the film making last-minute edits to the script. ...

Commitment Is Ben Affleck Rewriting The Script For “Batman v Superman” While Dressed As Batman
If I've learned anything about Ben Affleck, it's that when he does something, he goes all in. When Ben Affleck decided to cheat on his wife, ...

Script Analysis: Robert Carlock On Writing "Whiskey Tango Foxtrot"
Tina Fey's writing partner on adapting journalist Kim Barker's memoir, The Taliban Shuffle: Strange Days in Afghanistan and Pakistan . Though ...

Script For A Perfect Job Interview
Here's a script of a manager (Brittany) interviewing a job candidate (Gustavo) in a non-scripted, conversational way. Could you start interviewing ...

Resources last updated: 3/11/2016 2:56:43 PM