Hello World!

I've been having trouble with using Excel, in that it's extremely slow. I think I've isolated the problem, but don't know whether it's to do with perl, my pc, or what.

This script:...

use Win32::OLE::Const 'Microsoft Excel'; print xlExtractData."\n";
Takes 75 seconds to execute!

I did this:
perl -D:Prof test1.pl
dprofpp -r tmon.out
and got this result:

Exporter::export has -1 unstacked calls in outer Exporter::Heavy::heavy_export has 1 unstacked calls in outer Total Elapsed Time = 74.89209 Seconds Real Time = 74.89209 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 99.4 74.45 74.454 538 0.1384 0.1384 Win32::OLE::Const::_Typel +ib 0.36 0.268 74.722 1 0.2678 74.721 Win32::OLE::Const::_Typel +ibs 0.07 0.051 0.051 1 0.0510 0.0510 Win32::OLE::Const::_LoadR +egTypeLib 0.05 0.040 0.040 1 0.0400 0.0400 Win32::OLE::Const::_Const +ants 0.04 0.030 74.892 1 0.0300 74.892 main::BEGIN 0.03 0.020 0.050 3 0.0066 0.0165 Win32::OLE::Const::BEGIN 0.01 0.010 0.010 2 0.0050 0.0050 Config::fetch_string 0.01 0.010 0.010 2 0.0050 0.0050 DynaLoader::BEGIN 0.01 0.010 0.010 3 0.0033 0.0033 vars::BEGIN 0.00 0.000 0.000 1 0.0000 0.0000 Exporter::Heavy::heavy_ex +port 0.00 - -0.000 1 - - Config::TIEHASH 0.00 - -0.000 1 - - DynaLoader::dl_load_file 0.00 - -0.000 1 - - DynaLoader::dl_install_xs +ub 0.00 - -0.000 1 - - warnings::BEGIN 0.00 - -0.000 1 - - Config::import
My system:
XPpro SP1 with 512 Mb memory, an Intel(R) Pentium(R) M processor 1600MHz with a bus speed of 797 MHz, activeperl v5.8.4 build 810.

I'm in well over my head, now. can anyone help me, please?

Thanks,
Spike.


In reply to Over a minute to do: use Win32::OLE::Const 'Microsoft Excel'; by spikey_wan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.