"The template file size is too large or has too much content. Reduce the size or content of the template file. Apex heap size too large: XXX" is displayed.

 

Template File

  • In Excel, delete unused rows and columns. Excel normally saves rows with values and formatting, but for some reason an empty row may be recognized as a used cell and a large number of unnecessary rows are saved.
  • In Excel, check for hidden and unnecessary sheets, and delete any unnecessary sheets.
  • If images are included in the template file, reduce the file size of the images by lowering the image quality.

 

The maximum number of output characters is 6 million (approximately 6 MB) for the template file structure plus record values. Template files contain multiple XML files, and all XML tags are counted as characters. When outputting a child record, the number of XML tags in addition to the record value will increase proportionally.