Title: Message
Thomas, Mark - BLS CTR wrote:
 
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.
 
 
Well I hacked something together. It doesnt do formatting really...
not selectable anyway. not yet... but it does at the very least use
write_string and sets cell formats to strings.

which takes care of my biggest problem.

and i can keep 1 template and just ass a 'type' as a variable to the template
and get

either a
csv
tsv
xls

maybe when i get done mark, i can share it with you and then i can answer the why.
and yeah i'm working on an abstraction layer now...


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

Reply via email to