0 votes

I'm looking for an example how to export Efficy content to CSV File using Datasynchro
In Efficy Help I found only an example to export to Excel file


asked in How to by (103 points)

1 Answer

+1 vote


You can build a CSV file in memory in using a DataSynchro script. This is explained on this Project guide, see topic 9.1.

Here is also a minimalistic version of the export script you can add to export from a query the K_CONTACT and NAME of a contact.

var ExportList,
Folder = "C:\\temp\\";

function EfficyExportRecord(SourceDataSet, DestDataStore) {
  ExportList.Add(SourceDataSet("K_CONTACT") + "\t" + SourceDataSet("NAME")); 
  return false;

function EfficyStartJob(SourceRecordCount) {
  Efficy.log("Job has started, count: " + SourceRecordCount);
  ExportList = TStringList.Create;
function EfficyEndJob(SourceRecordCount) {
  Efficy.log("Job has finished");
  var file = Folder + 'MyExport.csv';
  Efficy.log("Saved to file " + file);
answered by (7.4k points)

that seems very interesting. I will do some test next week and I will give you a feedback of my results.

Thanks for your help
Welcome to Efficy Overflow, where you can ask questions and receive answers from other members of the community.
1,249 questions
1,519 answers
328 users