Skip to main content
Participant
July 21, 2022
Answered

Data Merge- Data is importantly very incorrectly and all over the place

  • July 21, 2022
  • 2 replies
  • 2448 views

When I import a .csv file, the data is displayed all over the place, very incorrect. Clearly there is something wrong with my source data doc. I think the problem is formatting. So I format it in a way that the data is not abbreviated due to not enough cell space. Very think is now readable by InDesign.

This is my issue: formatting does not save within a .csv. InDesign Data Merge requires a .csv. How do I save my formatting in a .csv so that InDesign can read my data correctly? 

This topic has been closed for replies.
Correct answer Peter Spier

OK.

First, make a new template file for the data merge. Preview has been buggy for years and can cause bad merges, so I advise never to use it. If a preview has damaged the template, in my experience it cannot be recovered and must be rebuilt.

Running a test merge on a few records is one quick option, or just merge the whole data set without preview. If it's correct, great, else juast discard the bad file and find the problem before rerunnning the merge.

Are there any special characters in the field names? Check the first row of the file in Excel VERY carefully. Also look for line breaks in individual cells that might cause a problem.

You can also try resaving in Excel, and try saving as tab-delimited rather than .csv and see if that makes a difference.

2 replies

Peter Spier
Community Expert
Community Expert
July 21, 2022

Need a lot more information.

Version of InDesign, OS. Single record or multiple records per page? Do you preview the merge before running? Are the merge fileds on the Parent/Master page or the document page? (A screen shot would be very usefule here) How was your .csv file made? How is it encoded?

For what it's worth, you can use either .csv or tab-delimited text for your data source.

Are you able to share your template file and a sample of your data file?

Participant
July 26, 2022

Thanks for the reply.

InDesign version 17.3 on Windows 10 operating system. Single record per page, generating a total of 250 records total. I do use the preview before running the merge and don't get any further than that because it does not preview correctly. I am not sure if the merge fields are on the parent/master page or document page. I'm thinking document page. Unfortunatley I can't share any screenshots or CSV's due to stakeholder confidentiality. 

The .csv is created through an export on WizeHive (the database I use). I open in Excel and import into InDesign. Encoding is UTF-8.

Peter Spier
Community Expert
Peter SpierCommunity ExpertCorrect answer
Community Expert
July 26, 2022

OK.

First, make a new template file for the data merge. Preview has been buggy for years and can cause bad merges, so I advise never to use it. If a preview has damaged the template, in my experience it cannot be recovered and must be rebuilt.

Running a test merge on a few records is one quick option, or just merge the whole data set without preview. If it's correct, great, else juast discard the bad file and find the problem before rerunnning the merge.

Are there any special characters in the field names? Check the first row of the file in Excel VERY carefully. Also look for line breaks in individual cells that might cause a problem.

You can also try resaving in Excel, and try saving as tab-delimited rather than .csv and see if that makes a difference.

Participant
July 21, 2022

Sorry for all the typos! Was very tired. I think the  TRIM function is my solution. 

Participant
August 22, 2022

Update-

The issue was that there was a question in the database that allowed multiple responses, messing up the data. I took that question out and the data merge worked perfectly. Thanks to those who helped along the way!