Re: [Templates] tt and SpreadSheet::WriteExcel

[prev] [thread] [next] [Date index for 2005/01/06]

From: Sean T Allen
Subject: Re: [Templates] tt and SpreadSheet::WriteExcel
Date: 20:22 on 06 Jan 2005
This is a multi-part message in MIME format.
--------------050600020809070400010308
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Or thinking further still:

[% USE sheet = spreadsheet( filetype ) %]
[% FOREACH row IN rows %]
[% cells = [] %]
[% FOREACH cell IN row.cells %]
[% cells.push ( cell.data, **format** ) %]
[% END %]
[% sheet.add_row( cells ) %]
[% END %]

to style an individual cell

as to exactly how it would work for styling an entire row or column.... 
hmmm...

interesting... because for an excel file using SpreadSheet::WriteExcel 
it could just
be done at the end... I suppose for a tsv or csv or something it could 
either ignore
styling altogether or it starts to get pretty complicated.


Sean T Allen wrote:

>
>
> Thus the idea of using a plugin that supplies various functions for 
> spreadsheet creation inside
> of a tt2 file. and depending on a runtime selection of final output 
> excel,tsv,csv et al.
> the functions would format passed in data properly in the output file.
>
> So the plugin would provide a unified interface to styling, adding 
> columns, adding rows etc
> and could basically act as a envelope and pass the real work to 
> whatever delegate class is
> selected at the time of processing.
>
> But again I havent thought this all the way through...
>
> but something like
>
> [% USE sheet = spreadsheet( filetype ) %]
> [% FOREACH row IN rows %]
> [% sheet.start_row() %]
> [% FOREACH cell IN row.cells %]
> [% sheet.add_cell( cell.data ) %]
> [% END %]
> [% sheet.end_row() %]
> [% END %]
>
> then you either add formatting via say an additional flag to add_cell
> so you could do:
>
> [% sheet.add_cell( cell.data, cell.style ) %]
>
> if the data carries style info with it.
>
> or if it doesnt but you know the 2nd loop needs to be a date...
> you code hardcode there... etc etc...
> whatever the possibility...
>
> My question would be as I havent use tt2 for very long is,
> can I do this:
>
> [% USE sheet = spreadsheet( filetype ) %]
> [% FOREACH row IN rows %]
>
> [% sheet.add_row(
>
> [% FOREACH cell IN row.cells %]
> [% sheet.add_cell( cell.data ) %]
> [% END %]
>
> ) %]
>
> [% END %]
>
> in some fashion, with blocks or something else of the sort...
>
> so that is the basic idea of what i was thinking...
>
>
>
>


--------------050600020809070400010308
Content-Type: text/x-vcard; charset=utf-8;
 name="sean.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="sean.vcf"

begin:vcard
fn:Sean T. Allen
n:Allen;Sean T.
org:USA Herbals, LLC
email;internet:sean@xxxxxxxxxx.xxx
title:Tech Guru
tel;work:718-388-5424
x-mozilla-html:FALSE
version:2.1
end:vcard


--------------050600020809070400010308--

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 14:41 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Simon Wilcox 16:22 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Mike Whitaker 16:28 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 16:41 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 16:37 on 06 Jan 2005

RE: [Templates] tt and SpreadSheet::WriteExcel
Thomas, Mark - BLS CTR 16:41 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Todd Freeman 16:51 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 15:45 on 07 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Todd Freeman 00:14 on 08 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 06:45 on 08 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 16:57 on 06 Jan 2005

RE: [Templates] tt and SpreadSheet::WriteExcel
Thomas, Mark - BLS CTR 17:18 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 17:27 on 06 Jan 2005

RE: [Templates] tt and SpreadSheet::WriteExcel
Thomas, Mark - BLS CTR 17:28 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 18:27 on 06 Jan 2005

RE: [Templates] tt and SpreadSheet::WriteExcel
Thomas, Mark - BLS CTR 19:02 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 19:45 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 20:22 on 06 Jan 2005

RE: [Templates] tt and SpreadSheet::WriteExcel
Thomas, Mark - BLS CTR 20:19 on 06 Jan 2005

Re: [Templates] tt and SpreadSheet::WriteExcel
Sean T Allen 22:40 on 06 Jan 2005

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52