By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

Error while running code

P: 3
Hi,

I was trying to execute this code keeping the filename as readxl.pl and got the below error:
Can't locate Spreadsheet/ParseExcel/Simple.pm in @inc<@inc contains C:/Perl/site/lib C:/Perl/lib.>at readxl.pl line1
BEGIN failed-compilation aborted at readxl.pl

I downloaded the Spreadsheet_ParseExcel_Simple_1_04.tar.gz assuming that this might be missing from the Perl library

Could anyone help me out in finding the directory under which this file should be placed?

Thanks!!
Aug 16 '10 #1
Share this Question
Share on Google+
8 Replies


Expert Mod 100+
P: 589
It doesn't need to be in any particular place. You could have it in your home dir.

The real question you need to ask is "What do I need to do with this file to install the module?".

The answer can be found at:
http://www.cpan.org/misc/cpan-faq.ht...l_Perl_modules
http://www.cpan.org/modules/INSTALL.html
Aug 16 '10 #2

numberwhun
Expert Mod 2.5K+
P: 3,503
You will notice that I have moved your post to a new thread. The thread that you posted to was 2 years old. Even if you use code from an old post, please DO NOT post to it as the thread is then resurected and no longer pertains to the original user. Essentially, you hijacked an old thread.

What OS are you on? That is something we would need to know. I would recommend you use the CPAN interface on Unix to install modules, that way you don't have to go through the hassle of building the modules by hand and also manually installing any dependencies. If you are on Windows, then you might want to look into Strawberry Perl as it contains the same CPAN interface as the Unix version of Perl.

Either way, RonB is correct, the answer is you need to install the module properly.

Regards,

Jeff
Aug 17 '10 #3

P: 3
Hi,

I am using Windows XP and my Perl Version is 5.8.9

I have the following folders inside C:\Perl
(bin, etc, eg , html , man , site and lib(which in turn has so many folders)

I am not sure which one among the above should I have the extracted folder of Spreadsheet_ParseExcel_Simple_1_04.tar.gz .

I am just a beginner to Perl and your help is really a great one.Thank You!!

Best Regards,
Rudhra
Aug 17 '10 #4

Expert Mod 100+
P: 589
Are you using Activestate Perl, or Strawberry Perl?, or cygwin?
Aug 17 '10 #5

numberwhun
Expert Mod 2.5K+
P: 3,503
I concur with RonB that we really need to know what version of Perl you are running (not just the version number).

On another note though, I would HIGHLY recommend that you read one of the free Perl ebooks on the net. This one is quite good and will give you a good grounding.

Regards,

Jeff
Aug 17 '10 #6

P: 3
Hi Both,

Thanks a lot for guiding me!!

I am using ActiveState Perl and yesterday I downloaded Strawbery Perl 5.12.256 as Jeff recommended but I was searching for links which helps in starting with Strawberry perl scripting as there ws no sample scripts available in strawberry perl like we had in ActiveState Perl.

Thanks for the nice links...I will go through them.

Cheers,
Rudhra
Aug 18 '10 #7

Expert Mod 100+
P: 589
If you want to use Strawberry perl, then you should uninstall ActiveState. Windows isn't as "smart" as *nix, so having 2 different perl ports can/will cause problems.

ActiveState comes with the ppm (Perl Package Manager) utility, which makes installing (and removing) modules very easy.

ActiveState can also use cpan to install modules just like Strawberry perl. To automate the setup to use cpan, you would use the ppm utility to install MinGW.

After that, you would be able to use cpan just like Strawberry perl.

If you're using Strawberry perl and want to use the ppm gui interface for installing modules, then simply use cpan to install the ppm module.
Aug 18 '10 #8

numberwhun
Expert Mod 2.5K+
P: 3,503
Sorry, I wasn't trying to throw confusion into the mix, but we didn't know which version you were using. Regardless of which distribution of Perl you use, Perl is Perl. The only difference between the two is how you install modules, really.
I would recommend reading the books in one of the links above as that should get you going in Perl.
Aug 18 '10 #9

Post your reply

Sign in to post your reply or Sign up for a free account.