[opencms-dev] Alkacon OAMP Webform module: Line breaks in input fields messes up CSV export (Excel)

Paul-Inge Flakstad flakstad at npolar.no
Wed Feb 16 14:19:04 CET 2011


An update:
A closer look revealed that not ALL line breaks spells trouble.

- If the entered textarea data does not start with an integer, things work as I expect ...
- ... but if it starts with an integer? Trouble!

An example, fetched from the actual form - and when I say "cell" and stuff like that I'm ofc talking about the exported CSV file.

If, in a textarea field, you enter an address like this:
321 W. 4th Ave., Suite 101
Anchorage, AK 98765
USA

- Line 1 will be placed in the designated cell
- Line 2 will be placed in the first cell of the next row
- Line 3 will be placed in the first cell of the next row
(So a single entry creates three lines in the Excel sheet, instead of one.
Moreover, the cell order is "shifted", creating a terrible output: data that should be placed in the cell after the "address" cell is now placed in the second cell of line #3 and so on.)

But if the address was this:
Norwegian Polar Institute
Fram Centre
9296 Tromsø

or even this:
1255-351 St Mary Blvd
Gatinbleu, QC
K2A 0C3

Everything (including the line breaks) is placed in the designated cell and all is good.

I have the module source, but I don't have much time on my hands ATM to dig very much in it. Can someone (the author?) please point me to what I need to modify?

Best regards,
Paul

________________________________
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Paul-Inge Flakstad
Sent: 16. februar 2011 12:35
To: The OpenCms mailing list
Subject: [opencms-dev] Alkacon OAMP Webform module: Line breaks in input fields messes up CSV export (Excel)

Hi,

Line breaks entered into a textarea input field messes up the resulting Excel file (when exporting as CSV).

Each line succeeding the first line break in a textarea field becomes a new row in Excel. I don't know a whole lot about Excel, and I don't plan to either, but this seems to me like a bug in the Webform module. Is it? Or is it just the way it should be?

Best regards,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110216/3d6df5b0/attachment.htm>


More information about the opencms-dev mailing list