perl - How do I create a text file so when it is opened in Excel, rows are grouped together? -
I am collecting some data through Perl script. Using Excel, data needs to be reviewed and processed by others. Currently, I am writing the data as a tab-delimited text file, and Excel can open it properly.
There is a hierarchy for the data, however, and it would be easy to see the tree instead of a flat list for reviewers. Instead of submitting data in columns,
foo foo1 foo foo2 foo3 times 2 times 2 times ...
as a click Submit Group Function of Excel (found under "Data> Settings" in 2007):
This is a good match for the presentation, to operate in comparison to the pivot table. A little easier. What is the easiest way to go to this group list from this flat list of columns? Ideally, I I can write the data in a text form that will automatically apply grouping when importing Excel. Alternatively, reviewer can apply after importing data, such as a macro or template Applying, which will also be ok.
Since you are already using Perl, I Suggest that use the excellent CPAN module You use Excel file directly using CPAN module.
It: . $ Worksheet-> Write ('A2', 'Foo'); $ Worksheet- & gt; Write ('B3', 'Fu1'); $ Worksheet- & gt; Write ('B4', 'Foo2'); $ Worksheet- & gt; Write ('B5', 'Foo 3'); $ Worksheet- & gt; Set_orro (2, undefined, undefined, 0, 1, 1); $ Worksheet- & gt; Set_ro (3, undefined, undefined, 0, 2); $ Worksheet- & gt; Set_ro (4, undefined, undefined, 0, 2); $ Worksheet- & gt; Set_ro (5, undefined, undefined, 0, 2); . .
Comments
Post a Comment