RE: [Templates] tt and SpreadSheet::WriteExcel
[prev]
[thread]
[next]
[Date index for 2005/01/06]
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C4F42C.FCC8C2B8
Content-Type: text/plain
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
If you do that, you'd have to expose much of the Spreadsheet::WriteExcel API
as a TT plugin due to the convoluted way SSWE and the underlying Excel
binary representation work. Not only would that be difficult, but it
wouldn't buy you anything. You'd be doing coding in TT instead of coding in
perl. Perhaps that's your goal? I guess I'm back to the question I started
with--why?
A TT version of the SSWE API is going to be just as hostile to
non-programmers. Unless you build an abstraction layer like
Spreadsheet::WriteExcel::Simple, but currently that just handles
bold/non-bold row writing, not fonts, colors, widths, cell formats, etc.
- Mark.
------_=_NextPart_001_01C4F42C.FCC8C2B8
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV>But again I havent thought this all the way through...<BR><BR>but
something like<BR><BR>[% USE sheet = spreadsheet( filetype ) %]<BR>[% FOREACH
row IN rows %]<BR>[% sheet.start_row() %]<BR>[% FOREACH cell IN row.cells
%]<BR>[% sheet.add_cell( cell.data ) %]<BR>[% END %]<BR>[% sheet.end_row()
%]<BR>[% END %]<BR><BR>then you either add formatting via say an additional
flag to add_cell <BR><SPAN class=545304619-06012005><FONT face=Arial
size=2> </FONT></SPAN></DIV></BLOCKQUOTE>
<DIV><SPAN class=545304619-06012005><FONT face=Arial size=2>If you do that,
you'd have to expose much of the Spreadsheet::WriteExcel API as a TT plugin
due to the convoluted way SSWE and the underlying Excel binary representation
work. Not only would that be difficult, but it wouldn't buy you anything. You'd
be doing coding in TT instead of coding in perl.</FONT> <FONT face=Arial
size=2>Perhaps that's your goal? I guess I'm back to the question I started
with--why?</FONT></SPAN></DIV>
<DIV><SPAN class=545304619-06012005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=545304619-06012005><FONT face=Arial size=2>A TT version of the
SSWE API is going to be just as hostile to non-programmers. Unless you build an
abstraction layer like Spreadsheet::WriteExcel::Simple, but currently that just
handles bold/non-bold row writing, not fonts, colors, widths, cell formats,
etc.</FONT></SPAN></DIV>
<DIV><SPAN class=545304619-06012005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=545304619-06012005><FONT face=Arial size=2>-
Mark.</FONT></SPAN></DIV>
<DIV><SPAN class=545304619-06012005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>
------_=_NextPart_001_01C4F42C.FCC8C2B8--
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
RE: [Templates] tt and SpreadSheet::WriteExcel
Thomas, Mark - BLS CTR 20:19 on 06 Jan 2005
|