Item9131: Last header field is garbled and whitespace added.
Priority: Normal
Current State: New
Released In:
Target Release: n/a
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