This page contains common issues or problems with Excel templates and how to resolve them.
I want sheets to output on New sheets, or the Same sheet
To make these changes, you need to set your first ForEach tag's Advanced properties.
- break=sheet will make the contents within the ForEach Loop be written to new sheets for every new set of data from your data source
- break=page will make the contents within the ForEach Loop be written to the same sheet for every new set of data from your data source (it will all be one one page if you were to print it)
- The default setting (nothing selected) will write the ForEach content onto the same sheet (like break=page)
Template takes too long to Output
In your template, hit Ctrl-End and see where the final cell is in your report. If it is much past the actual cells used in the template, this could be the cause. Adjust your worksheet and re-try. See this article for more information on clearing data from cells.
Numbers don't Output correctly from Word template to Excel
If your template is a Word document with a table, and your output is an Excel report, beware of these common errors. We generally discourage crossing document types upon Output. For more information, please see the following articles:
- Lets say your data is numbers in the form $12,345.67 and so each cell then will be populated with currency amounts. So your output is now a row of numbers you can now sum, change the format on, etc - correct?
No! It looks right but actually what you have is a bunch of cells containing text and Excel does not see them as numbers. For these to be numbers the cells should have a value of 12345.67 and a format of "$#,###.00" And the only way to do this is to design the template in Excel because Word has no concept of cell number formatting.
- Lets say your data is in the form of 12.345,67 and your locale is a European country so it will parse this correctly and read the number correctly as 12345.67. And you set the pattern="$#,###.00" so it will output it in the currency format. All set right?
No! Again, the cell value is not a number such as 12345.67 but is instead a string "$12,345.67" and that is not a number. Again, to make this work you need to design your template in Excel, not Word.