Jump to content

Recommended Posts

Posted

Hello,

in a CSV with semicolon as separator for data merging I want to use a comma in the text like "John Doe, xyz" and not as a separator. When is create a csv like

name;date of birth
John Doe, xyz;15. September 2015

Publisher ignores the Komma and writes

Name: John Doe xyz
Birth: 15. September 2015

If I include all data in ".."

it doesn't worka at all:

"name";"date of birth"
"John Doe, xyz";"15. September 2015"

To not include the data of the first line in "..." like this

name;date of birth
"John Doe, xyz";"15. September 2015"

doesn't work too.

What am I doing wrong?

Thank you for your answers.

Rainer

Posted

String fields with commas must be enclosed within quotes.
LibreCalc does this automatically but there are many flavours of csv, it should look like this in a text editor

name,date of birth
"John Doe, xyz",15. September 2015
"Bill Smith, abc",29. November 1963

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Posted
11 minutes ago, David in Яuislip said:

String fields with commas must be enclosed within quotes.

I’m guessing that this shouldn’t apply if

sep=;

is specified at the top of the CSV file, but in any case the OP says

1 hour ago, RainerH said:

If I include all data in ".."

it doesn't worka at all:

"name";"date of birth"
"John Doe, xyz";"15. September 2015"

 

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.5.1 (iPad 7th gen)

Posted

Affinity csv import doesn't allow sep=; at the top. I tried it earlier to test here but it assumes there's another record

name;date of birth
"John Doe, xyz";"15. September 2015"
should've worked, as it doesn't I would check the encoding, if it's not UTF-8 then convert it, if it is then I give up
Tsv might be an alternative but I've never got that to work

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Posted

In the Data Merge Manager you can specify the separator you want to use:

image.png.8c3eba009c0e2f2fab724a8dc6ce75f2.png

 

But using LibreOffice Calc, I have no problem generating a CSV file whose fields contain the "," character, and which uses the ";" as the separator. And as mentioned above, any fields that contain a "," are automatically quoted. And the file works properly for Data Merge.

Samples (using Publisher 2.5.0.2402, but should open in Publisher 2.4):

data-merge-test.afpub Untitled 2.csv

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.