in reply to Using Excel timestamp with perl

The easiest way would be to just install Spreadsheet::ParseExcel::Utility and use its LocaltimeExcel() and ExcelLocaltime functions together with Time::Local to convert between epoch times and Excel times.

If you really, really cannot install modules, you can just copy the relevant code out of the module and use it in your code.

I recommend to try to get that module installed.

Replies are listed 'Best First'.
Re^2: Using Excel timestamp with perl
by Varkh (Initiate) on Jun 03, 2014 at 12:36 UTC

    Thank you for the fast reply.

    Unfortunately, we really can't install any modules, as it is a script that must work for different clients that doesn't want any change on their servers (and I mean, ANY change ... :( ).

    I will try this and will keep you updated !

    Thanks,

    Varkh.

      Here's a couple of ideas about how to use additional modules without "installing" them on the clients' systems.

      If you need to keep the script as Perl script (i.e. distribute as a .pl file to be run the interpreter), you can use App::FatPacker to pack in all of the needed modules into one big script.

      If you install PAR::Packer, you can use the pp utility to create a stand-alone executable that you could distribute to clients. In this case, the clients would not even need to install Perl on their systems. There are other packager utilities that you could use too (CavaPackager, Perl2Exe, PerlApp from ActiveState's Perl Development Kit or Pro Studio). (Some of these are free and others you will need to purchase).

        Wow. I'm getting more and more amazed by the possibilities of Perl. I will look after these fine advices and try to use a standalone version of a module. That should do the trick too !

        Thanks,

        Varkh

      clients that doesn't want any change on their servers (and I mean, ANY change ...
      ... including your script????

        Fortunately, my script is the only thing they will accept, as long as it doesn't do anything more than writing on a few files and send some emails !

      You can load modules to an external directory and just reference that dir on startup.
      #!/usr/bin/perl use strict; use warnings; push(@INC, "/jet/prod/include"); use MyPersonalModule; #code here

        That is wrong, it does not work. You want use lib "/jet/prod/include"; instead so that the modification to @INC happens at compile time.