Item9131: Last header field is garbled and whitespace added.

pencil
Priority: Normal
Current State: New
Released In:
Target Release: n/a
Applies To: Extension
Component: ExcelImportExportPlugin
Branches:
Reported By: BigBaaadBob
Waiting For:
Last Change By: BigBaaadBob
As reported here (an email thread I guess), the plugin has issues with the final header column. Quoting from the report:

When I exported a table (without any template information) the surrounding asterisks (*) of the last header column were not removed. And also in the data rows the last column contained an extra whitespace at the end in the excel file.

In the following regular expression (line 691 of Export.pm)

if (/^\s*\|\s*(.*)\s*\|\s*$/) {

the subexpression within the () must be non-greedy.

if (/^\s*\|\s*(.*?)\s*\|\s*$/) {

Otherwise it grabs the blank before the last '|' of a table row which leads to parsing errors.

I'm entering this here just so it can be tracked; Rolf Huehne (the original reporter) gets the credit for the fix, etc...

I've verified the fix works against version foswiki-excelimportexportplugin 090313-205 .

(There are additional enhancements in this thread that I'll put into another task.)

-- BigBaaadBob - 09 Jun 2010

 

ItemTemplate edit

Summary Last header field is garbled and whitespace added.
ReportedBy BigBaaadBob
Codebase 1.0.9
SVN Range
AppliesTo Extension
Component ExcelImportExportPlugin
Priority Normal
CurrentState New
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r1 - 09 Jun 2010, BigBaaadBob - This page was cached on 16 Jan 2020 - 15:47.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy