LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-31-2011, 05:23 AM   #1
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Rep: Reputation: 47
perl problem with Spreadsheet::XLSX::Utility2007


there is a problem with ExcelFmt() subroutine. when I try this:

Code:
print ExcelFmt('hh:mm', $time), "\n";
to get time in hour:minute format, it fails if time is 12:00 AM, with error:
Code:
Use of uninitialized value $dObj in int at /usr/share/perl5/Spreadsheet/XLSX/Utility2007.pm line 775.
Use of uninitialized value $dObj in subtraction (-) at /usr/share/perl5/Spreadsheet/XLSX/Utility2007.pm line 776.
what to do?
thanks.
 
Old 10-31-2011, 08:34 AM   #2
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Original Poster
Rep: Reputation: 47
this has been solved. problem was that 12:00 AM is stored in excel cell as 0. (excel seems to store time as percentage of day). but for some reason, perl module returned that value as NULL. so I used:

Code:
my $time = 0;  
$time=$Cell->{Val} if( $Cell->Value );
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
converting .xlsx to .xls from bash qrange Linux - Newbie 5 01-23-2014 08:00 AM
Perl Modules Spreadsheet::WriteExcel not working in Cron muzammil18 Linux - Newbie 3 07-05-2011 09:42 AM
system froze when I clicked Save for Calc spreadsheet, now the spreadsheet is gone Stringdude Linux - Newbie 2 11-24-2010 01:05 AM
I got switched from a word process doc. into spreadsheet form. now ALL is spreadsheet 293 manzanita Linux - Newbie 1 08-04-2010 01:14 PM
xlsx to xls proNick Linux - Software 12 12-15-2008 12:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration