in reply to Re: Re: Modifying an Excel doc (UNIX)
in thread Modifying an Excel doc (UNIX)
Now, Excel::Template, like its name suggests, builds XLS files from a template in a file and a data structure in memory. You use the template for the look'n'feel and the data structure for the data, like HTML::Template. (It was built to be a helper to HTML::Template.)
If I understand the real problem you're attempting to solve, you have a workbook that you need to provide to some end users. That workbook has a bunch of data and the like that needs to go into a given layout. Your workbook will always have N columns, but the specific data in B5 (or whatever) will change. (Maybe, one day it's "Chicago" and the next day it's "New York".)
This is the perfect place for a template. It requires rethinking your approach. But, it's doable.
Now ... taking the XML from Spreadsheet::ParseExcel and creating a template ... that would be problematic. Here's the issue - Excel::Template is actually misnamed - it should really be called Excel::Layout. Templating is only the smaller part of what it does - it really does the layout for an XLS.
The long and short of this is that I would have no way of determining that the first 10 rows belong to the CITIES loop and the second 10 rows belong to the STATES loop. The layout is something provided by a human, as is the data structure. The module should stick to what it does and get good at that.
A parse-string method would certainly be helpful. I'll put that in the next release. Thanks!
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re3: Modifying an Excel doc (UNIX)
by pank$ (Initiate) on Apr 17, 2013 at 17:44 UTC | |
by Anonymous Monk on Apr 18, 2013 at 08:22 UTC |