Skip Menu |

This queue is for tickets about the Excel-Template-XLSX CPAN distribution.

Report information
The Basics
Id: 105683
Status: resolved
Priority: 0/
Queue: Excel-Template-XLSX

People
Owner: dclarke [...] cpan.org
Requestors: Detlef.Niemann-Bode [...] t8y.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: v1.0.5



Subject: Loosing format information in merged cells
Date: Mon, 6 Jul 2015 09:04:24 +0000
To: "bug-Excel-Template-XLSX [...] rt.cpan.org" <bug-Excel-Template-XLSX [...] rt.cpan.org>
From: Detlef Niemann-Bode <Detlef.Niemann-Bode [...] t8y.com>
Hi Dave, thanks for your Excel Template library. Looks like it could be the perfect starting point for a small project I am working on. Unfortunately, my Excel template uses lots of merged cells, containing formatted text even with line breaks. And even before doing any real templating work, I am getting lost of most of the format information. I have attached two example files showing the problem. I am running perl 5, version 20, subversion 2 (v5.20.2) built for x86_64-linux-gnu-thread-multi on a debian 8 system. The example Excel file generated by Excel for Mac Preview. But an older File coming from a PC shows the same problems. The code I used is rather simple, more or less from your documentation: my ($self, $wbk) = Excel::Template::XLSX->new("$outpath/out_$file", "$inpath/$file"); my $template = Template::Tiny->new( TRIM => 1 ); $self->{template_callback} = sub { my ($self, $textref) = @_; $template->process($textref, { template => 'Output' }, $textref ); }; I am not a all familiar with debugging libraries, so I just want to ask if this is on your to do list or I will have to see if I can fix it or work around it on my own. Cheers, Detlef -- detlef niemann-bode | managing director | t8y.com gmbh | t +49 40 2351 3959 | bernhard-nocht-straße 113 | 20359 hamburg | managing directors: detlef niemann-bode, christian koop local court of hamburg - hrb 117865; registered seat: hamburg
Download formattest.xlsx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 28.7k

Message body not shown because it is not plain text.

Download out_formattest.xlsx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 5.6k

Message body not shown because it is not plain text.

Hi Detlef, I tested a small script, and reproduced the error you were observing. The problem is that the merged cells and the rich string formatting are parsed separately, but need to be combined. I am working on an update to this module to fix this. Sorry for the **long** delay (8 months!) in getting back to you. I moved shortly after you posted the bug report, and since my E-Mail was tied to my ISP, I lost my account that cpan was forwarding E-Mails to. I didn't notice the bug report until just a couple of days ago, when I happened to be browsing my module on CPAN. I will let you know when I have posted a new release. Perhaps you can let me know if this fixes the issue for you. By now, you probably have some kind of work-around. On Mon Jul 06 05:04:54 2015, Detlef.Niemann-Bode@t8y.com wrote: Show quoted text
> Hi Dave, > > thanks for your Excel Template library. Looks like it could be the > perfect starting point for a small project I am working on. > Unfortunately, my Excel template uses lots of merged cells, containing > formatted text even with line breaks. > And even before doing any real templating work, I am getting lost of > most of the format information. > I have attached two example files showing the problem. > > I am running perl 5, version 20, subversion 2 (v5.20.2) built for > x86_64-linux-gnu-thread-multi on a debian 8 system. > The example Excel file generated by Excel for Mac Preview. But an > older File coming from a PC shows the same problems. > > The code I used is rather simple, more or less from your > documentation: > my ($self, $wbk) = Excel::Template::XLSX-
> >new("$outpath/out_$file", "$inpath/$file");
> > my $template = Template::Tiny->new( TRIM => 1 ); > $self->{template_callback} = sub { > my ($self, $textref) = @_; > $template->process($textref, { template => 'Output' }, $textref ); > }; > > I am not a all familiar with debugging libraries, so I just want to > ask if this is on your to do list or I will have to see if I can fix > it or work around it on my own. > > Cheers, > Detlef > > > -- > detlef niemann-bode | managing director | t8y.com gmbh | t +49 > 40 2351 3959 | bernhard-nocht-straße 113 | 20359 hamburg | > managing directors: detlef niemann-bode, christian koop > local court of hamburg - hrb 117865; registered seat: hamburg
Subject: Loosing format information in merged cells - v1.0.5 updated on CPAN
On Mon Jul 06 05:04:54 2015, Detlef.Niemann-Bode@t8y.com wrote: Show quoted text
> Hi Dave, > > thanks for your Excel Template library. Looks like it could be the > perfect starting point for a small project I am working on. > Unfortunately, my Excel template uses lots of merged cells, containing > formatted text even with line breaks. > And even before doing any real templating work, I am getting lost of > most of the format information. > I have attached two example files showing the problem. > > I am running perl 5, version 20, subversion 2 (v5.20.2) built for > x86_64-linux-gnu-thread-multi on a debian 8 system. > The example Excel file generated by Excel for Mac Preview. But an > older File coming from a PC shows the same problems. > > The code I used is rather simple, more or less from your > documentation: > my ($self, $wbk) = Excel::Template::XLSX-
> >new("$outpath/out_$file", "$inpath/$file");
> > my $template = Template::Tiny->new( TRIM => 1 ); > $self->{template_callback} = sub { > my ($self, $textref) = @_; > $template->process($textref, { template => 'Output' }, $textref ); > }; > > I am not a all familiar with debugging libraries, so I just want to > ask if this is on your to do list or I will have to see if I can fix > it or work around it on my own. > > Cheers, > Detlef > > > -- > detlef niemann-bode | managing director | t8y.com gmbh | t +49 > 40 2351 3959 | bernhard-nocht-straße 113 | 20359 hamburg | > managing directors: detlef niemann-bode, christian koop > local court of hamburg - hrb 117865; registered seat: hamburg