Format a data export in Word

The first step is to export the data to a. csv file. Then the file is opened with Excel to separate the fields and work on the data (sorting e.g.)

Use the csv export file in Word

The principle of fusion is to create a Word document template in which you define the desired presentation (style sheet): choice and order of fields, font, style, color, etc… using the csv file obtained in export as a data source (database).

We select the fields present in the .csv file to put in the Word file, ordering and separating them according to the desired format. Then the data in the .csv file is ‘merged’ with the word template file thus constituted, which gives a Word file ‘result’. The Word file ‘template’ can be saved for reuse with other data from another csv export

So we have 3 files:

  1. a csv file that contains fields and data in each of the exported fields = data source file (database),

  2. a Word file that is the template file, consisting of fields selected from the csv data source, with a custom layout and style

  3. a results file consisting of the merging of the two preceding: import of data from the csv file according to the characteristics defined in the model file.

How to make

  • In Word, open a new file, which will be the template file, then choose Tools->Letters and Mailings->Mail Merge Wizard or Mailings->Start Mail Merge->Step by Step by Mail Merge Wizard (note: the tool name may vary depending on your version of Word). A toolbar or pop up appears with instructions.

  • Under Select document type, click Letters.

  • Select the list of recipients: it is at this stage that the .csv file is chosen as the source file. Open the data source by selecting your export file .csv; choose a Unicode format.

  • Choice of fields present in the source file .csv: drag or select the fields proposed in the word file created initially, which will be the template. Fields can be ordered, separated by separators (comma, space, period, etc.), with a particular font, style, font colors, etc.

  • Set a standard record in the template file at this time.

  • Insert the record separator also (line, line break, etc…)

  • Merge results: the merge creates another Word file, the result file; this action imports the data from the .csv file as defined in the template.

The model can then be reused.

See also word help.