RainerH Posted April 22, 2024 Posted April 22, 2024 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 Quote
David in Яuislip Posted April 22, 2024 Posted April 22, 2024 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 Quote 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
Alfred Posted April 22, 2024 Posted April 22, 2024 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" David in Яuislip 1 Quote Alfred 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)
David in Яuislip Posted April 22, 2024 Posted April 22, 2024 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 Alfred 1 Quote 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
walt.farrell Posted April 23, 2024 Posted April 23, 2024 In the Data Merge Manager you can specify the separator you want to use: 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 Alfred, RainerH and David in Яuislip 3 Quote -- 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
RainerH Posted April 25, 2024 Author Posted April 25, 2024 walt.farrell, you are my hero of the day, no, of the week! How blind was I to miss the delimiter selection option?!?!?!?!? walt.farrell 1 Quote
Recommended Posts
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.