Are you trying to use an excel file (.xls or .xlsx) as the data source? You have to actually save the file into either .csv or tab-delimited text format (although both of those will open in Excel, they are really plain text files that can be opened in any text editor) to use as a data source.
What's your OS? What error message do you see, if any?
When using data merge always ensure your targeted data base file is closed!!
Data merge will not work if the targeted file is open in the original program
Making sure the database is closed isn't always the catch-all answer to data merge error dialogs. I've found at least eight different dialogs that can be associated with data merge errors and they range from these dialogs:
- The selected data source has one or more empty field names. Please fix the file or select another file
- The data source cannot be opened. Confirm that the file exists and that you have rights to open it, then choose the Select Data Source command again.
- There is at least one data placeholder that cannot be found in the data source. Make sure all the placeholders correspond to the fields in the data source.
- The data source file you selected either has no records or is not a supported file format. Please fix the file, select a file that contains records, or select a supported file type.
- Content contains characters which cannot be encoded
- Generic extended parser error
- The data source references one or more missing images. The missing images cannot be previewed or merged. At the time you create a merged document, you can choose to generate a list of all missing images.
- Not well-formed
If a user exported their data from excel to a csv or txt file BUT did not close the file AND then attempted to select a data source, THEN the second dialog would appear.
Also, I can have the database open in the application "textwrangler" on my mac and still select it as a source data file in InDesign's Data Merge. The above error looks specific to Excel, but I'm sure it'll happen with other software.
That said, in answer to the OP's question, I believe the answer may relate to something else, such as having a colon in the middle of a field name. Anyone can reproduce this fault by copying the code below into a text editor and then select it as a data source for a data merge:
name,suburb,post:code John,Adelaide,5000 Craig,Calgary,T9Y 7B3 Max,Sydney,2000
a different error will occur if there are two colons:
name,suburb,pos:t:code John,Adelaide,5000 Craig,Calgary,T9Y 7B3 Max,Sydney,2000
remove the colons and it works:
name,suburb,postcode John,Adelaide,5000 Craig,Calgary,T9Y 7B3 Max,Sydney,2000
interestingly, if the colons are at the start, end (or both) of a field name, then it will work too:
name,suburb,:postcode: John,Adelaide,5000 Craig,Calgary,T9Y 7B3 Max,Sydney,2000
But because the OP didn't provide a screenshot of the error, not did the OP write the exact wording of the error down, we won't quite know what happened.