f



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
0
hemanth004 (20)
12/4/2007 10:02:05 AM
comp.lang.tcl 23428 articles. 2 followers. Post Follow

10 Replies
1058 Views

Similar Articles

[PageSpeed] 18

In article <83ef457f-b378-4e86-bcf2-cfb3678c1300@e25g2000prg.googlegroups.com>,
raaki  <hemanth004@gmail.com> wrote:
>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.
			.
			.
			.
I do a lot of this:  <URL: http://wiki.tcl.tk/excel >.
0
claird (2363)
12/4/2007 1:29:46 PM
On Dec 4, 2:29 pm, cla...@lairds.us (Cameron Laird) wrote:
> In article <83ef457f-b378-4e86-bcf2-cfb3678c1...@e25g2000prg.googlegroups.com>,raaki  <hemanth...@gmail.com> wrote:
> >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.
>
>                         .
>                         .
>                         .
> I do a lot of this:  <URL:http://wiki.tcl.tk/excel>.

Hi Cameron,

i already went through Excel page which u referred.but i didnt find
any thing perticular for solaris.
can you guide me  little deeper   regrding this topic
i  need to write my results into seperate excel tabular format file.
0
hemanth004 (20)
12/6/2007 11:25:52 AM
On 6 Dez., 12:25, raaki <hemanth...@gmail.com> wrote:

> i  need to write my results into seperate excel tabular format file.

There is not one specific "Excel table file format", but a variety,
including

- plain-text CSV (comma-separated values), which is easiest written
from Tcl - see http://wiki.tcl.tk/2215
- .XLS (some proprietary binary format, possibly in various
"dialects")
- XML in recent Excel versions
- SYLK probably still possible - see http://wiki.tcl.tk/9800

I'd suggest to use CSV format. A file might look like this:
data from file a;data from file B
hello;world
foo;bar

....
0
12/6/2007 11:34:56 AM
At 2007-12-06 06:25AM, "raaki" wrote:
>  On Dec 4, 2:29 pm, cla...@lairds.us (Cameron Laird) wrote:
> > In article <83ef457f-b378-4e86-bcf2-cfb3678c1...@e25g2000prg.googlegroups.com>,raaki  <hemanth...@gmail.com> wrote:
> > >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.
> >
> >                         .
> >                         .
> >                         .
> > I do a lot of this:  <URL:http://wiki.tcl.tk/excel>.
>  
>  Hi Cameron,
>  
>  i already went through Excel page which u referred.but i didnt find
>  any thing perticular for solaris.
>  can you guide me  little deeper   regrding this topic
>  i  need to write my results into seperate excel tabular format file.

Unless you need to apply formatting, it's far easier to write a
delimited text file.  If you use commas to separate your fields and save
the file as filename.csv, Excel will open it like a spreadsheet.


-- 
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
0
glennj (645)
12/6/2007 11:41:27 AM
On Dec 6, 12:41 pm, Glenn Jackman <gle...@ncf.ca> wrote:
> At 2007-12-06 06:25AM, "raaki" wrote:
>
>
>
>
>
> >  On Dec 4, 2:29 pm, cla...@lairds.us (Cameron Laird) wrote:
> > > In article <83ef457f-b378-4e86-bcf2-cfb3678c1...@e25g2000prg.googlegroups.com>,raaki  <hemanth...@gmail.com> wrote:
> > > >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.
>
> > >                         .
> > >                         .
> > >                         .
> > > I do a lot of this:  <URL:http://wiki.tcl.tk/excel>.
>
> >  Hi Cameron,
>
> >  i already went through Excel page which u referred.but i didnt find
> >  any thing perticular for solaris.
> >  can you guide me  little deeper   regrding this topic
> >  i  need to write my results into seperate excel tabular format file.
>
> Unless you need to apply formatting, it's far easier to write a
> delimited text file.  If you use commas to separate your fields and save
> the file as filename.csv, Excel will open it like a spreadsheet.
>
> --
> Glenn Jackman
> "You can only be young once. But you can always be immature." -- Dave Barry- Hide quoted text -
>
> - Show quoted text -

thks suchewi and jackmann

i already have some scripts that write .csv format,but the formatting
really doesnt look good when i open with excel.
thats why, am trying to write my results directly to .xls format
0
hemanth004 (20)
12/6/2007 12:50:05 PM
In article <60a0f2d1-c28e-4b74-9299-25a0e76dfba8@e10g2000prf.googlegroups.com>,
raaki  <hemanth004@gmail.com> wrote:
>On Dec 6, 12:41 pm, Glenn Jackman <gle...@ncf.ca> wrote:
>> At 2007-12-06 06:25AM, "raaki" wrote:
>>
>>
>>
>>
>>
>> >  On Dec 4, 2:29 pm, cla...@lairds.us (Cameron Laird) wrote:
>> > > In article
><83ef457f-b378-4e86-bcf2-cfb3678c1...@e25g2000prg.googlegroups.com>,raaki
><hemanth...@gmail.com> wrote:
>> > > >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.
>>
>> > >                         .
>> > >                         .
>> > >                         .
>> > > I do a lot of this:  <URL:http://wiki.tcl.tk/excel>.
>>
>> >  Hi Cameron,
>>
>> >  i already went through Excel page which u referred.but i didnt find
>> >  any thing perticular for solaris.
>> >  can you guide me  little deeper   regrding this topic
>> >  i  need to write my results into seperate excel tabular format file.
>>
>> Unless you need to apply formatting, it's far easier to write a
>> delimited text file.  If you use commas to separate your fields and save
>> the file as filename.csv, Excel will open it like a spreadsheet.
>>
>> --
>> Glenn Jackman
>> "You can only be young once. But you can always be immature." -- Dave
>Barry- Hide quoted text -
>>
>> - Show quoted text -
>
>thks suchewi and jackmann
>
>i already have some scripts that write .csv format,but the formatting
>really doesnt look good when i open with excel.
>thats why, am trying to write my results directly to .xls format

I understand the question.  Indeed, formatting through CSV is a
challenge, one I haven't solved.

I've had success in the past importing .HTML into Excel.  If your
project were my responsibility, that would be my next approach.

To produce .xls directly on a Solaris constitutes a research topic;
it's a substantial piece of work.  If I decided that's what I
needed, I'd first carefully research any precedents.  I suspect
Perl people have made progress that might apply.

I summarize:  look into HTML-coded formatting; report your results
back here, and we'll likely be able to provide more tips.
0
claird (2363)
12/6/2007 1:34:54 PM
raaki wrote:

> i already have some scripts that write .csv format,but the formatting
> really doesnt look good when i open with excel.
> thats why, am trying to write my results directly to .xls format

I've had good luck writing data as html with embedded css. I was 
surprised to discover excel would even pick up formulas embedded in the 
html. I had no idea excel was smart enough to translate an html table 
into a spreadsheet (but then, I've used excel approximately twice in the 
last 10 years).


-- 
Bryan Oakley
http://www.tclscripting.com
0
oakley (2074)
12/6/2007 2:45:08 PM
In article <60a0f2d1-c28e-4b74-9299-25a0e76dfba8@e10g2000prf.googlegroups.com>,
raaki  <hemanth004@gmail.com> wrote:
>On Dec 6, 12:41 pm, Glenn Jackman <gle...@ncf.ca> wrote:

>i already have some scripts that write .csv format,but the formatting
>really doesnt look good when i open with excel.
>thats why, am trying to write my results directly to .xls format

Totally off the wall suggestion: have you tried openoffice?

I know there is tuno, the tcl-OOo bridge, but I don't know
if it is enough to maniuplate OOo's spreadsheet program.

I think this is the real difficulty. On Windows, COM can
be used to manipulate Excel directly. As far as I know,
there isn't anything like COM that can run directly on
Solaris to manipulate Excel. OOo works on Solaris, and if
tuno works, it may be easier to manipulate OOo, and then
convert to Excel.

-- 
WL
real mail: wliao at sdf loSnPesAtarM org
(remove the uppercase letters...)

0
me4 (19624)
12/10/2007 6:40:12 AM
In article <fjin0c$eo5$1@chessie.cirr.com>, WL <me@privacy.net> wrote:
>In article <60a0f2d1-c28e-4b74-9299-25a0e76dfba8@e10g2000prf.googlegroups.com>,
>raaki  <hemanth004@gmail.com> wrote:
>>On Dec 6, 12:41 pm, Glenn Jackman <gle...@ncf.ca> wrote:
>
>>i already have some scripts that write .csv format,but the formatting
>>really doesnt look good when i open with excel.
>>thats why, am trying to write my results directly to .xls format
>
>Totally off the wall suggestion: have you tried openoffice?
>
>I know there is tuno, the tcl-OOo bridge, but I don't know
>if it is enough to maniuplate OOo's spreadsheet program.
>
>I think this is the real difficulty. On Windows, COM can
>be used to manipulate Excel directly. As far as I know,
>there isn't anything like COM that can run directly on
>Solaris to manipulate Excel. OOo works on Solaris, and if
>tuno works, it may be easier to manipulate OOo, and then
>convert to Excel.
			.
			.
			.
It's not "[t]otally off the wall ...", at least by my
standards.  Yes, tuno can also represent a solution for
the problem as described here.
0
claird (2363)
12/14/2007 4:14:13 PM
On Dec 14, 5:14 pm, cla...@lairds.us (Cameron Laird) wrote:
> In article <fjin0c$eo...@chessie.cirr.com>, WL <m...@privacy.net> wrote:
> >In article <60a0f2d1-c28e-4b74-9299-25a0e76df...@e10g2000prf.googlegroups.com>,
> >raaki  <hemanth...@gmail.com> wrote:
> >>On Dec 6, 12:41 pm, Glenn Jackman <gle...@ncf.ca> wrote:
>
> >>i already have some scripts that write .csv format,but the formatting
> >>really doesnt look good when i open with excel.
> >>thats why, am trying to write my results directly to .xls format
>
> >Totally off the wall suggestion: have you tried openoffice?
>
> >I know there is tuno, the tcl-OOo bridge, but I don't know
> >if it is enough to maniuplate OOo's spreadsheet program.
>
> >I think this is the real difficulty. On Windows, COM can
> >be used to manipulate Excel directly. As far as I know,
> >there isn't anything like COM that can run directly on
> >Solaris to manipulate Excel. OOo works on Solaris, and if
> >tuno works, it may be easier to manipulate OOo, and then
> >convert to Excel.
>
>                         .
>                         .
>                         .
> It's not "[t]otally off the wall ...", at least by my
> standards.  Yes, tuno can also represent a solution for
> the problem as described here.- Hide quoted text -
>
> - Show quoted text -

Hi members

thanks to all of you for your valuable suggestions.i used perl to dump
my results directly to .xls format.
i am suceeded on solaris but not on linux when i run the same
script.trying to figure what the prob is....
0
hemanth004 (20)
12/17/2007 4:07:17 PM
Reply: