--
You received this message because you are subscribed to the Spreadsheet::WriteExcel Google Group.
For posting and other options visit this group at:
http://groups.google.com/group/spreadsheet-writeexcel?hl=en
You can also post by sending an email to:
http://groups.google.com/group/spreadsheet-writeexcel?hl=en
To unsubscribe send an email to spreadsheet-write...@googlegroups.com
On Oct 12, 2011 10:36 PM, "fhleung" <fhl...@gmail.com> wrote:
>
>
> So I'd like to put the input excel file in other directory like
> "public_html/test"
> <code>my $workbookR = $parser->parse('/public_html/test/file.xls');</
> code> but this NOT work
>
> My question is: howto parse excel file which is not at default path?
> This question may out of scope but hope if anyone know howto, please
> help.
>
Out of scope. However, if you can open the file from any other script, it'll work here. Ie, write something that pumps out a text file to the screen (browser) and go from there. Your file probably isn't opening because there isn't a /public_html directory. Mind security if you give users the ability to select different files. Probably use taint as well.
You mentioned not seeing your errors. This has everything to do with your web server and how you're calling the script. If you're running Apache, you'll probably notice it in the error.log file. Also look at %SIG stuff, Data::Dumper, psgi interactive debugger, perl's -d(ebug) option, log4perl, carp, StackTrace::More. I'd suggest you get a decent grasp on debugging before you do *anything* else - you'll be using this skill as much or more than any other in programming.
Per your experience and scope of different forums: perlmonks might help, however I would go to the begi...@perl.org list and #perl-help or #perl on irc and (maybe) stack overflow as well.
Also, if you're doing web work, get familiar with MVC. For small projects, it might not be necessary (I defer to Web::Simple until things get too big for instance) but its good to know the right way to do things so that in a year you pull less of your hair out.
On another note, I got started with perl by dealing with spreadsheets using this module. It is probably the best documented module you will find (the examples were golden to me). When you move on, you'll care about different things like what a method returns in different contexts (\me grumbles about Image::Magick's non-pod craptastic doc). While I haven't gotten intimate with this module in a few months, the doc has never failed me. It is what I think about when I consider how another module's doc should have been written.
HTH