Import csv with multi-line fields into LO base

I’m trying to import a csv file in libreoffice base. The peculiar thing about this csv file is that is contains fields with multi-line content.

I first opened the csv file in calc, which worked fine. Calc effectively displays the multi-line fields as multi-line.

Next I copied all cells and pasted them into an existing libreoffice base database table. While Calc handles the multi-line fields correctly, Base seems to discard any multi-line information. In base the field only holds one line, concatenating all the lines that make up the multi-line field. The field type in the table is TEXT/VARCHAR and is long enough to hold all the information.

Opening the table via a form also suggests the multi-line information has been stripped in the copy-past operation. I have created a form in which the field is displayed in a mult-line enabled text field, but all is shown as a single (long) line.

Any ideas how I can import multi-line content in a Base table ?

I started to comment,but since I really believe this will work, I decided to post it as an answer. Since Calc opens your CSV file correctly, can you simply then save the Calc file in .ods format, and then open the ODS file in Base?

@GeertJanssens – Does this answer work for you? If not, please describe the issue(s).

This is embarrassing in several ways :frowning:

First I managed to not be aware of this reply for over 6 years.

Secondly, now that I tried this again based on the answer it looks like there may never have been a problem with the data, but only with how it was presented to me.

When I look at the imported data from a table view, all newlines seem to be suppressed. However if I create a form based on that table and make the fields multi line, the newlines are still there.

So thank you for ponting my in the right direction and apologies for the late reply.

Is this what you are after? (see the last comment)

http://user.services.openoffice.org/en/forum/viewtopic.php?f=13&p=144391

http://www.oooforum.org/forum/viewtopic.phtml?t=110116

Thank you for your reply. These two threads deal with the opposite of what I’m trying to accomplish. They explain how to export from base to csv while preserving multi-line fields. I tried the tip of using a memo type field as import field, but still during the import any newlines are stripped.

I am afraid I cannot help you then. I hope someone else has the answer.