roho has asked for the wisdom of the Perl Monks concerning the following question:
Steps to reproduce the problem:
1. Open Excel spreadsheet, select and copy a cell.
2. Run the sample code below.
3. Edit the output file.
#!/usr/bin/perl use strict; use warnings; use Win32::Clipboard; my $clip = Win32::Clipboard(); my $text = $clip->Get(); my $ofile = "xx.bat"; open my $fh2,'>', $ofile or die "Error opening output file $ofile: $!\ +n"; binmode $fh2, ":encoding(UTF-8)"; print $fh2 $text, "\n";
"It's not how hard you work, it's how much you get done."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Excel and Win32::Clipboard
by Corion (Patriarch) on Mar 25, 2020 at 21:13 UTC | |
|
Re: Excel and Win32::Clipboard
by roho (Bishop) on Mar 25, 2020 at 23:29 UTC | |
by pryrt (Abbot) on Mar 26, 2020 at 02:00 UTC |