Date formats can be a problem with Excel, you might need to convert to match properly
#!perl
use strict;
use Spreadsheet::XLSX;
use Spreadsheet::ParseExcel::Utility qw(ExcelFmt);
my $col1 = 1; # B
my $col2 = 35; # AJ
my $wb = Spreadsheet::XLSX->new ('c://temp//Book1.xlsx');
my $ws = $wb->Worksheet('Sheet1');
foreach my $row ($ws->{MinRow} .. $ws->{MaxRow}) {
# column B
my $c1 = $ws->get_cell($row,$col1);
my $ymd = ExcelFmt('yyyy-mm-dd', $c1->unformatted) if defined $c1;;
# column AJ
my $c2 = $ws->get_cell($row,$col2);
my $value = $c2->value if defined $c2;
print "$row $ymd $value\n";
}
poj
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.