I am building trending charts using Win32::OLE in active perl. I am trying to set the major axis unit so that I will get only 7 points in the x-axis. For that I am using the below code:
with( $chart->Axes( xlCategory ),
CategoryType => 3,
MajorUnit => ceil( ( $end - $start ) / 7 ),
MajorUnitScale => xlDays );
This is not working in Excel2007 but working fine Excel2010. Using Excel 2010, returns the end and start date as "41124.5" and "40767". But Excel 2007, returns as "Fri 12 Aug 00:00" and "Fri 3 Aug 12:00". As a reason, its not working. How can I transform this strings to numeric format?