generating docs and spreadsheets from templates