Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

xlsx _quote_sheetname

by czechtraveller (Initiate)
on Nov 24, 2012 at 18:34 UTC ( #1005413=perlquestion: print w/replies, xml ) Need Help??
czechtraveller has asked for the wisdom of the Perl Monks concerning the following question:

The problem was in the autofilter() function

I use Perl 5.12.4 so not sure what to do to make the xlsx support autofilter method. They claim it is not fully supported.

Have you ever received this error?
Can't locate object method "_quote_sheetname" via package "Excel::Writ +er::XLSX::Worksheet" at C:/Perl/lib/Excel/Writer/XLSX/ li +ne 987.
I checked my code 100x times and still cannot see what would be the source of this problem. My program should print out 3 sheets in a file but gets stuck before the 2nd sheet.
my $workbook = Excel::Writer::XLSX->new($xlsfile); # Add a worksheet my $worksheet = $workbook->add_worksheet( 'Inputs'); my $format1 = $workbook->add_format( %font_basic ); ......... my $worksheet2 = $workbook->add_worksheet('Results');
If I update their code then it complains about this method: $workbook->close();

I appreciate your help.


Replies are listed 'Best First'.
Re: xlsx _quote_sheetname
by 2teez (Priest) on Nov 24, 2012 at 19:34 UTC

    Hi czechtraveller,

    • First of, I think you have to re-format your post, see How do I post a question effectively?
    • Check through your code, and reformatting. I have this:
      use warnings; use strict; use Excel::Writer::XLSX; my $xlsfile = 'Excel in 2007.xlsx'; my $workbook = Excel::Writer::XLSX->new($xlsfile); # Add a worksheet my $worksheet = $workbook->add_worksheet('Inputs'); my %font_basic; # add your format parameters my $format1 = $workbook->add_format(%font_basic); my $worksheet2 = $workbook->add_worksheet('Results'); $workbook->close();
      Which work fine for me, with no error message.
      I think you need check again for where a method like this _quote_sheetname is been used on Excel::Writer::XLSX::Worksheet in your script
    • You can as well check Excel::Writer::XLSX::Examples for Excel::Writer::XLSX usage.
    • Update:
      "..The problem was in the autofilter() function...what to do to make the xlsx support autofilter method.."
      Why is that? I don't think you have to write your own autofilter method. Autofilter is supported in that module.
      Check this: Example: Autofilter
      Except, you have something else in mind.

    If you tell me, I'll forget.
    If you show me, I'll remember.
    if you involve me, I'll understand.
    --- Author unknown to me

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1005413]
Approved by mbethke
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2017-06-23 22:02 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (555 votes). Check out past polls.