Bascule has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Excel > Data > Text to Columns (Win32::OLE)
by davies (Monsignor) on Apr 29, 2014 at 13:23 UTC | |
by Bascule (Initiate) on Apr 29, 2014 at 14:18 UTC | |
by davies (Monsignor) on Apr 29, 2014 at 14:39 UTC | |
by Bascule (Initiate) on Apr 29, 2014 at 15:01 UTC | |
by davies (Monsignor) on Apr 29, 2014 at 15:24 UTC | |
|
Re: Excel > Data > Text to Columns (Win32::OLE)
by poj (Abbot) on Apr 29, 2014 at 14:02 UTC | |
by Bascule (Initiate) on Apr 29, 2014 at 14:23 UTC | |
by Bascule (Initiate) on Apr 29, 2014 at 14:29 UTC | |
by davies (Monsignor) on Apr 29, 2014 at 14:20 UTC |