I am sorry for scaring you. I did not intend to. You have
a reasonable question, asked in a good way. What bothered
me was the quality of the responses that you got. I hold
answerers to a higher standard than questioners.
As for your more specific question, there are two possible
answers.
One is to use the format_csv function that I
gave you, and write a loop where you walk through your data,
fetch it into Perl, and then write the file yourself. I
would generally suggest doing that, my experience is that it
is easier to pull data into Perl and manipulate it in Perl
than it is to drive an external application.
The other is to get the Excel approach working. Not having
it available at the moment, I cannot test it. But I can
tell you that the error message will not generally be put
into $!. Instead you will need to call
Win32::OLE::LastError() to get the error message. No
promises, but the odds are pretty good that if you check
that you will get useful feedback.
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.