New line character for Descriptive fields in CSV Import

1,058 views
Skip to first unread message

prathmes...@gmail.com

unread,
Dec 16, 2015, 3:20:30 PM12/16/15
to ICA-AtoM Users
Hi,

   I am trying to figure out, what character has to be used in a narrative field during a CSV import, so that the sentences are formatted on new lines within the field. I am using Atom 2.0 instance and using the command line interface to perform the imports.

    We tried using the pipe "|" character between the fields, that resulted in aligning the sentences in new line BUT also created a empty blank line before the start of the text. Then if you check via front-end edit form, it has an asterisk " *  " marks in the field, I'm not sure where they come from and if they are cause of the problem.

For example, in the CSV one of the columns dcOtherDescriptionNotes has value, Legacy identifier refers to the ICFA accession number.|Similar as 2012.0011.0036.
This resulted in the follow empty line when imported ,


I tried searching documentation (https://www.accesstomemory.org/en/docs/2.0/user-manual/import-export/csv-import/), but couldn't find a solution.

I would appreciate if some one could help me find the right character or any other trick to resolve this.

Best,
Prathmesh Mengane,
Database and Web Developer,
Dumbarton Oaks- Harvard University.

Dan Gillean

unread,
Dec 16, 2015, 6:49:28 PM12/16/15
to ICA-AtoM Users
Hi Prathmesh,

I don't know if I am aware of what the literal newline character is (maybe you could use a hex editor to figure that out?), but for preparing your CSV files, I do know this: you can create the carriage returns/new lines in a cell that you want in the spreadsheet application you are using to prepare your CSV data. To add a linebreak / carriage return inside a cell, try:
  • LibreOffice Calc - CTRL + Enter
  • MS Excel - ALT + Enter

I'd personally recommend LibreOffice Calc as it gives you more control over the character encoding - Excel tends to default to its own encoding, but you can specify UTF-8 in LibreOffice Calc very easily, and AtoM excepts a UTF-8 encoded CSV file.

Whenever I have previously imported a CSV file where I've seen linebreaks inside a cell while looking at it in a spreadsheet application, AtoM has respected those on import - so the application seems to be handling the newlines for me.

Also, there is this in the docs - not sure if it helps:

Cheers,


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/8c9c1167-5b26-488c-a8f3-e089adf32b8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

prathmes...@gmail.com

unread,
Dec 21, 2015, 10:56:30 AM12/21/15
to ICA-AtoM Users
Hi Dan,

    The trick of adding line break/carriage via Excel using Alt+Enter works perfectly for what I'm trying to achieve. I also tested it via adding a new line character in a Text Editor (BBEdit) and that works too and the formatting is preserved after the import.

Thanks a lot for you quick help, as always !!

Best,
Prathmesh M.
Reply all
Reply to author
Forward
0 new messages