I replicate your issue, and it sound like you want to create data merge in a table.
First create the data in Excel and save as Text (Tab Delimited)
Second in Indesign form Data Merge panel select data resoure.
Create Table with 4 columns and 2 rows (the first row for titles), in the second row insert the data information
Third select the second row to duplicate and run the (CSVTOTABLES) script
(CSVTOTABLES) script download from here:
Thanks for your reply, I will try this and will get back to you.
I am sorry I did not explain my problem properly, acctually it is personalised letters which will send to different recepients some people have 1 record and some have more than 1.
see below image, (top one is excel data, and below is a sample of 2 different letter to different people).
can this be possible?
Please help me out to solve this issue if this is possible in InDesign.
To do this with InDesign's built-in Data Merge you would need to re-build the data file so that each person has only a single record and enough fields in that record to hold all the possible information, so instead of a single Address, Period, and Date field you would need multiple Address, Period and Date fields (each with a unique name), and only one line per policy holder. You would need to know the maiximum number of p;licies that one person could have, and set up for that, leaving fields blank for those who have fewer policies.
Frankly, this probably is not viable for you from the standpoint of how you store the data. I think an XML workflow might work better, but I have no experience in XML.
I am assuming this data resides in an actual database somewhere. Something scalable like a flavor of SQL or a proprietary file format. And likely there is some unique identifier for each person that their policies and its details are tied to.
In order for the data to be usable for you, it needs to have this unique identifier. This is because whether the data is given to you in CSV/Excel format or XML, it needs to have this unique identifier for you to group/consolidate the data that is unique to each individual.
In CSV/Excel format, this would be as Peter says. Each line in the CSV/Excel file has to contain every piece of data associated with a single person in separate columns.
Or, if in Excel format where there are discrete lines for each person as it appears above, it needs the unique identifier in order to create a pivot table to group each person's data together under a single person name entry. At that point, one would then need to get the data out of Excel, likely into XML where the hierarchy of nodes maintains the grouping of data associated with each unique person. Once into XML from an Excel export, it still isn't directly usable by ID and would need "transformed" by an XSL file into a format of XML that ID is going to be able to utilize.
The "easiest" path forward, it seems to me, is to work with whomever is supplying the data and let them know how it needs to be presented in a CSV file. Which would mean that there would be the name column, a column for each bank/policy name, etc. If the data is really stored like in your example, there may exist a means to add a column to the left of each person's name and write a formula to create a unique identifier based upon the name column.
Without seeing the present CSV, that's about as far as I can go with any recomendations/babbling.
Looks like Sajid wants to do a one-to-many relationship database merge. InDesign's data merge can't do this.
That is, InDesign can handle one-to-one relationship databases. In other words, one client has one car, one address....
This example has One client has one or many policies... an example of a one-to-many relationship. There may be a third party plug-in that allows this, but straight off-of-the-shelf, indesign's data merge will put one record on a page, e.g.
page 1, name 1, policy 1
page 2, name 1, policy 2
page 3, name 1, policy 3
page 4, name 2, policy 1.
Thanks for your support
Appriciate your support, thanks
Thank You, I wish InDesign could do this.