JIRA 4.0 : Customising JIRA Excel Output
This page last changed on Sep 19, 2005 by jnolen.
OverviewMicrosoft Office 2000 supports Hypertext Markup Language (HTML) as a native file format. Allowing Microsoft Excel to save and open HTML files as spreadsheets with all the document formatting preserved. The document can be formatted through a combination of HTML, XML and Cascading Style Sheets (CSS). The format of the excel output from JIRA can be modified by editing the template file navigator-excel-current.jsp (located within src/webapp/secure/views/navigator/ of your JIRA home folder). Editing this file is essentially editing a HTML template file with tables and styles. By default the template file navigator-excel-current.jsp should contain: navigator-excel-current.jsp ... <style> @page { mso-page-orientation:landscape; } br { mso-data-placement: same-cell; } </style> ... The above formats the default excel output to have the page orientation as landscape, and multi-lined text will be kept within one cell. Microsoft Office HTML and XML ReferenceMicrosoft Office HTML and XML reference contains a thorough listing of available styles and details on how to use them. The reference manual is available for download from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffxml/html/ofxml2k.asp ExamplesExample 1 - Customising Page SetupExcel uses CSS and @page definitions to store some page setup settings and XML to store others. Below is a sample to setup the page with the following document format respectively.
<style> ... @page { mso-page-orientation: landscape; margin:.75in .25in .75in .25in; mso-header-margin:.5in; mso-footer-margin:.4in; mso-footer-data:"&C Page &P of &N Date: &D Time: &T"; <!-- other @page styles ... --> } </style> Example 2 - Customising Cell FormattingBoth CSS and HTML are used to customise the cells. A global style that is applied to all table cells can be applied using TD definition. <style> ... TD { mso-numberformat:general; text-align: left; vertical-align: middle; color:red <!-- other TD styles ... --> } </style> The above applies the following styles to all table cells respectively:
|
![]() |
Document generated by Confluence on Oct 06, 2009 00:31 |