Item9131: Last header field is garbled and whitespace added.

Priority: Normal
Current State: New
Released In:
Target Release: n/a
Applies To: Extension
Component: ExcelImportExportPlugin
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

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
TargetRelease n/a
Topic revision: r1 - 09 Jun 2010, BigBaaadBob - This page was cached on 26 Jan 2021 - 14:07.

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