I have 20 files that I ran a perl parser on to delimit. (I had to do this because they were fixed width files, but excel did not import them properly.. ugh..)
now I have a perl script which builds an excel document, names 20 sheets in that document based on the filenames of the parsed files. I have a regular expression which delimits the files, and drops them into an array.. @parsed_file. What I need now is a way to put this data into their respective excel sheets, while preserving the delimited format. Unfortunately the only way I know to insert this is to use $Sheet->Range("a1")->{'Value'} = "@file"; yada yada yada... This only does one thing for me.. Inserts the entire file array into the first row, but of course, it's not delimited... I am trying to avoid a complicated solution, I.E. putting data into excel row by row from a nasty regex..
Anyone know any quick way to use OLE to accomplish my goal? I have searched far and wide, but probably stopped just short of my goal, so now my solution rests with you..
I am using
use Win32::OLE qw(in with);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.