The forward slash to backslash is the way things work on windows -- I always use forward slashes in path names and Perl happily flips them to backslashes when it talks to the windows. The program {as y'all will see} shows what the parse returned and that's exactly right. I put in the 'open' to double-check that the hardwired excel path was correct.

I neglected to include that this is with Strawberry Perl running on a win10/64 system. Here's the little test program:

#!/usr/bin/perl use v5.10 ; use strict; use warnings ; use Excel::Table ; use constant WORKBOOK => "d:/desktop/testWB.xlsx" ; # test if the path works open(P, "<", WORKBOOK) or die "Can't find the workbook: $!\n" ; close P ; my $xs = getWB(WORKBOOK) ; exit ; sub getWB { my ($dir, $wb) = $_[0] =~ /(.*)\/(.*)/ ; say "Directory is $dir" ; say "Excel file is $wb" ; my $xs = Excel::Table->new(dir => $dir) ; $xs->open($wb) ; return $xs ; }
I don't know how to upload the Excel worksheet that the file needs {anything will do, since I am only trying to open it and {for the nonce} don't care about whats *in* the file}, but when I run the program I get.
d:\Desktop>testWb.pl Directory is d:/desktop Excel file is testWB.xlsx Log4perl: Seems like no initialization happened. Forgot to call init() +?

In reply to Re^2: Help with Excel::Table by BernieC
in thread Help with Excel::Table by BernieC

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.