Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_column() #134

Closed
whichen opened this issue Aug 3, 2015 · 5 comments
Closed

set_column() #134

whichen opened this issue Aug 3, 2015 · 5 comments
Assignees
Labels

Comments

@whichen
Copy link

whichen commented Aug 3, 2015

the $format is defined.
when I use : $worksheet->set_column('A:C', 20 ,$format1)
the notes will appear "Redundant argument in sprintf at .../Excel/Writer/XLSX/Pachage/Style.pm"
when I removed the $format1, the problem will disappear.
Who can tell me the reason?
Thanks

@whichen whichen changed the title merger_range() set_column() Aug 3, 2015
@jmcnamara
Copy link
Owner

Hi,

Could you post a small, complete, working example that demonstrates the issue.

Thanks,

John

@jmcnamara jmcnamara self-assigned this Aug 3, 2015
@whichen
Copy link
Author

whichen commented Aug 4, 2015

Hi,

When I run this script, the warning is below:
[cid:image001.png@01D0CE9D.AFDC44A0]

After removing the $fm1, the problem will disappear.

$worksheet->set_column('A:C',20,$fm1);

Thanks.
White

@jmcnamara
Copy link
Owner

Hi,

When I run this script, the warning is below:

What script? If you attached a script via email then please note that GitHub doesn't accept attachments.

Please add the sample program here: #134

In order to save time, make sure that it is small, complete and working.

Thanks,

John

@whichen
Copy link
Author

whichen commented Aug 5, 2015

#!/users/whichen/perl/bin/perl5.22.0 


#use Spreadsheet::ParseExcel;
#use Spreadsheet::ParseExcel::FmtUnicode;
#use Spreadsheet::WriteExcel;
use Excel::Writer::XLSX;

my $workbook =Excel::Writer::XLSX->new('test.xlsx');
my $worksheet=$workbook->add_worksheet('test1');
my %fond=(
    font=>'Calibri',
    size=>12,
    color=>'blue',
    bold=>1,
    align=>'center',
    border=>1
);
my $fm1=$workbook->add_format(%fond);

my $fm_head=$workbook->add_format(
    border=>6,
    valign=>'vcenter',
    align=>'center',
    size=>12,
    color=>'blue',
    bold=>1,
);
#$worksheet->merge_range('A1:C3','Hello Excel!',$fm_head);
$worksheet->set_column('A:C',20,$fm1);
$worksheet->set_row(0,20);
$worksheet->write(0,0,'Hello Excel!');

jmcnamara added a commit that referenced this issue Aug 5, 2015
Fixes new redundant sprintf arguments warnings in perl 5.22.

Issue #134.
@jmcnamara
Copy link
Owner

Hi,

That is a new warning introduced in Perl 5.22: http://perldoc.perl.org/perldelta.html#New-Diagnostics

I've push a fix for it to the master branch and there is a new version on the way to CPAN.

Thanks for the report.

John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants