Copy link to clipboard
Copied
Hi
I'm trying to work with the data merge feature and I can't get it to import data. It tells me "The data source cannot be opened. Confirm that the file exists and you have the right to open it.."
I created a test data set of only 3 records and I have tried .txt and .csr both to no avail.
Is there something about licensing I don't know about, or do I have to import a plug-in...?
Ideas anyone?
Thanks
DJH
Hi
Looks like typical behavior when trying to import a data source which is already opened in another application (most probably Excel).
Make sure you file is NOT opened in another application and try again.
Vinny
Copy link to clipboard
Copied
It is likely how you are exporting the data.
Try this. Simply highlight the spreadsheet records and copy. Paste that into a text editor. Save that text using a .txt extension. Does that then load into ID's data merge panel?
It can matter what text editor you use and you don't mention your OS. It has to save as a plain text file and depending upon your needs, a UTF-8 can work fine for most languages, though for some a UTF-16 is needed.
If that doesn't work, the link is to a UTF-8, No BOM text file that should work for you.
Does that file work?
Mike
Copy link to clipboard
Copied
HI Mike - thanks for the speedy reply.
I'm on a Mac using Yosemite. My text editor is Word. Dropbox file doesn't work either.
Thanks
DJH
Copy link to clipboard
Copied
No worries.
And you are opening the merge file from the Data Merge panel?
Would you upload your test file?
Copy link to clipboard
Copied
In addition...
For testing, place the test.txt file from dropbox on your desktop.
When you use the Data Merge panel, and you use the hamburger menu to choose Select Source, there will be a dialog window opened. At the bottom of that window there should be a checkbox to Show Import Options. Make sure that is checked.
When you choose the test.txt file, you should then see the following:
If it is not displaying the options you see above automatically, change them to what you see above.
Once you click OK, you should then see in the data merge panel:
Copy link to clipboard
Copied
OK now I feel a little foolish! If the source document remains open in the host program - in this case Excel - it cannot be imported into InDesign. I tried again this morning and some documents came in ok and some didn't. That's when I realized my folly! Thanks for your help. I'm sure I may need it again when I delve deeper into variable mysteries!
How do you rate this data merge function in Indesign? Does it do what you need relatively painlessly?
Thanks again
DJH
Copy link to clipboard
Copied
I'm experiencing almost the same problem but the file is NOT open in excel, I've tried saving as a .csv as well as .txt file. Tried MW Designs suggestion about showing import options but I still get an error message that reads 'The selected data source has one or more empty field names. Please fix the file or select another file."
Aside from some addresses being one line and others being up to three lines, there are NO empty fields.
Am I missing something else??
Of course I have three different jobs to do with data merge & not one will work!
TIA
Copy link to clipboard
Copied
Is there a header row with field names, and does every single column in the data have an entry in that header row?
Copy link to clipboard
Copied
printerlady wrote
I'm experiencing almost the same problem [...]
I still get an error message that reads 'The selected data source has one or more empty field names. Please fix the file or select another file."
Hi Tia,
well it's not the same problem at all ^^ (You could even have opened a new thread)
Just like MW Design pointed it out, the error message means that you have an empty field in your header row (which is the first row, as you probably know).
Typically, it does mean that there are 2 (or more) consecutive separators in your header row.
Fastest solution is to open your CSV or TXT file in a text editor and to delete those unwanted separators.
Where do those separators come from? Well... there are quite a lot of possible answers, and they basically relates to Excel (or some other spreadsheet)
FYI, Excel makes the difference between "blank cell" and "empty cell"... That could be a reason.
Also, sometimes Excel acts kinda weird. For example: using the "Empty cell" button results to some sort of "ghost formatting". Cells are empty, blank but CSV exports as non-empty. Deleting cells solves it. I personally prefer to keep a clean Excel file instead of cleaning it afterwards in a text editor, but that's your call.
See below the illustration of this weird situation (imagine you want to get rid of 2 unwanted columns):
Edit:
Oh and also, this is also a very typical situation:
Hope that helps
Vinny
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi
Looks like typical behavior when trying to import a data source which is already opened in another application (most probably Excel).
Make sure you file is NOT opened in another application and try again.
Vinny
Copy link to clipboard
Copied
There are header rows with field names but every column does NOT have an entry. That's what I was trying to explain about the addresses. I have the headers titled ADDRESS 1; ADDRESS 2 & ADDRESS 3 but some entries only utilize one or two of those fields.
It's never made a difference in the past because when I choose content placement option, I tell it to delete empty fields/spaces.
Copy link to clipboard
Copied
The data fields--those below the headers can have empty spots--it's the header row itself cannot.
Humor me. Export from Excel as a tab-delimited text file. Does that work?
If not, can you edit the merge file to remove all but a few rows and upload that file and send me a private message with a download link? That is usually the shortest route to a fix. Oh, and do try that paired-down file before bothering to upload. If that works, then likely there is a cell with a line break or something that is cause ID fits.
Copy link to clipboard
Copied
Wow that was frustrating! I tried what you suggested & neither worked but I read what Vinny 38 explained & Excel did in fact create empty cells AFTER my last column which was creating the issue!
Problem solved. Thank you very much for you time & help!!
Copy link to clipboard
Copied
Sorry I'm tardy to the party here.
Some time ago I'd written an article about troubleshooting the errors in data merge, given that the Adobe help site for InDesign says how to make a data merge, but not what to do when error messages start to appear. Please feel free to read the piece that was written for InDesignSecrets: https://indesignsecrets.com/troubleshooting-data-merge-errors.php