Skip to main content
sandeeps24189
Participant
June 1, 2015
Question

Use InDesign server Data merge csv data source

  • June 1, 2015
  • 1 reply
  • 395 views

I have done a data merge on indd file with CSV data source.

myDocument.dataMergeProperties.selectDataSource(new File ('E:/Employees.csv'));

myDocument.dataMergeProperties.mergeRecords();

I need to loop through data source for some conditional logic. If, somehow, we can save this data source in local variable [array].

This topic has been closed for replies.

1 reply

Inspiring
June 1, 2015

You can read the source file and do some splitting based on the separator used. But if you need to go crazy with conditions, you may envision dedicated tools such as EasyCatalog.

Loic

sandeeps24189
Participant
June 1, 2015

Thanks Loic,
Actually, I am not aware about scripting property/method required to perform this operation. Any sample script.