1

i am getting Error

can't locate spreadsheet writeexcel.pm in @inc @inc contains

yes i know, it require the excel plugin,

am using straberry perl,

tell me where i find the excel plugin for PERL, and where shoukld paste that excel plugin

Bharanikumar
  • 25,457
  • 50
  • 131
  • 201
  • 8
    **yOUR cAPitALizaTIoN iS inaCURAte:** Perl is a *case-sensitive* programming language, and thus its identifiers and strings must be treated with greater care than you’ve shown here. – tchrist Jan 11 '11 at 13:02

2 Answers2

10

You can find the module on CPAN. To install it on strawberry perl interactively, do

perl -MCPAN -e shell
install Spreadsheet::WriteExcel

or (non-interactive)

cpan Spreadsheet::WriteExcel

Edit:

If you get any errors about unfulfilled dependencies (missing modules like OLE::Storage_Lite), install these dependencies using cpan <dependency> and then continue installation of your package.

If you don't need to stick on Strawberry Perl, you could switch over to ActiveState Perl which comes with an integrated package manager (PPM) that installs the required modules (including dependencies). ActiveState provides a repository with pre-built modules, so they don't need to be compiled.


Is @INC really empty? If so, you have to set @INC in order to specify the include directories for perl to search for modules.

Furthermore, I'd expect that the error message would read

can't locate Spreadsheet::WriteExcel.pm ...

if you specified the dependency correctly with use Spreadsheet::WriteExcel;.

eckes
  • 64,417
  • 29
  • 168
  • 201
  • how to install , this excel plugin in my system, – Bharanikumar Jan 11 '11 at 09:19
  • @Bharanikumar: what do you exactly mean? I told you how to install: either using `cpan Spreadsheet::WriteExcel` or by the interactive method... – eckes Jan 11 '11 at 09:20
  • i just downloaded the spreadsheet::WriteExcel plugin, i followed the read procedure, fir that am getting error like C:\sample\Spreadsheet-WriteExcel-2.37>perl Makefile.PL Warning: prerequisite OLE::Storage_Lite 0.19 not found. Warning: prerequisite Parse::RecDescent 0 not found. Writing Makefile for Spreadsheet::WriteExcel – Bharanikumar Jan 11 '11 at 09:26
  • Then i tried C:\sample\OLE-Storage_Lite-0.19>perl Makefile.PL Writing Makefile for OLE::Storage_Lite , that's why, am asking basic plugin installtion procedure – Bharanikumar Jan 11 '11 at 09:33
  • such great advise, installed above plugin very easily with this CPAN command..keep it up man – Bharanikumar Jan 11 '11 at 09:40
  • @Bharanikumar: Thanks. Don't forget to check the answer. I put my comments in the answer, so I'll delete them here. – eckes Jan 11 '11 at 09:42
  • Perl doesn’t have an `@inc` variable; perhaps you meant `@INC`. – tchrist Jan 11 '11 at 12:59
  • @tchrist: how did you guess that? Right. I'll fix it in my answer. Thanks. – eckes Jan 11 '11 at 13:13
  • @eckes - he's just THAT GOOD :) – DVK Jan 11 '11 at 14:23
0

If you installed it as root, then you need to execute your script as root as well. This solved the problem for me.

ЯegDwight
  • 24,821
  • 10
  • 45
  • 52