Rehman Masood wrote:
Hello My friends,
I am from Pakistan & have been benifeting from your website for a
while now. However, I have stuck a stone wall now and can't get throw.
My problem is that I am trying to utilize the Spreadsheet::WriteExcel
module from John McNamara and everything seems to be working great.
When I run my program as perl csv2xls.pl book1.csv book.xls, it works
fine. Although, what I am trying to do, is to trap some error checking
into the perl program. Although book1.csv does not exist, it should
give me an error saying "Couldn't open the .csv file named book1.csv:
No such file or directory". It gives me that error when I run it as
"perl csv2xls.pl book1.csv book.xls" but when I create the .exe file
using PAR, it gives me the following error message :-
Couldn't open the .csv file named book10.csv: No such file or directory
(in cleanup) Can't use an undefined value as a HASH reference at
C:/Perl
/site/lib/Spreadsheet/WriteExcel/Workbook.pm line 699.
Can you help me with the later error message. I am not sure where to
look for the error message. I tried reading the workbook.pm file but
it looks fine.
Thanks,
Rehman.
>Couldn't open the .csv file named book10.csv
Try adding the -a flag to your command line when making the .exe, as in
-a "fully_qulified_path_name_of_book10.csv"