Features

"Error creating document. An error occurred when creating the document using a template" when creating an Excel file

Issue

When trying to create an Excel file from a template an error occurs:

2605_Document_Templates_Excel_Error_Creating_Document.gif

"Error Creating Document. An error occurred when creating the document using a template. Please try again."

Cause

This could be caused by one of the following:

  • A Merge Field may not have been added correctly, or an incorrect field has been added to the Template
  • Merge Fields need to be added using the desktop version of Excel, as the functionality is not available in the Online version of Excel. If you have copied in Merge Fields when editing or creating the Template using the online version of Excel, they will show as the field itself and will not bring in the information that relates to the Merge Field only.
  • Merge Fields can be edited in the same way as text in the Template Editor, so you may have accidentally changed something in the Merge Field
  • You may have hidden sheets in your Excel Workbook that contain errors e.g. broken references (typically appear with #REF! in the cell)

Solution

Check the following:

  • Check the Merge Field has two curly brackets for opening and closing brackets - { and }
  • Make sure there is a space after the opening curly brackets and before the closing curly brackets.
  • Make sure the brackets are on the same line (so there are no line breaks in the Merge Fields).
  • Add the Merge Field again from the Template Editor in case the name of the Merge Field has been accidentally changed.
  • Check that you are including the correct field. Refer to the article Including Merge Fields in Excel Templates for more information.
  • Check there are no hidden Worksheets in the Excel file that are causing the error. To unhide a worksheet, right-click on any visible tab and then click Unhide. In the Unhide window, click the sheet you want to unhide and then click OK. Correct the hidden sheets if necessary before hiding again.
Was this article helpful?
0 out of 1 found this helpful