Greetings Monks *bows*,

Noob alert and apologies in advance for anything you deem requires an apology.

Just cutting my teeth on Perl and Excel - I've done some basic Perl in the past - now looking to learn new stuff.

I'm messing around with a script to run a "df -Pk" command on linux boxes using plink from my desktop (my $output = `plink -pw <pwd> -ssh -l <usr> $server df -Pk`;) and getting the output into excel. So far so good - the following code pastes the output of the df command into the first column of my spreadsheet:

my $CLIP = Win32::Clipboard(); $CLIP->Set($output); print "Clipboard contains: ", $CLIP->Get(), "\n"; my $paste_range = $worksheet->Range('A1'); $paste_range->PasteSpecial();

Each line is in its own row but all in a single column. Is there a way I can specify a delimiter whilst pasting (so that the file systems and values in each line are in separate cells) or is there a way of replicating the Data > Text to Columns process once I've pasted the data into the sheet?

Any advice gratefully received.


In reply to Excel > Data > Text to Columns (Win32::OLE) by Bascule

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.