Output as Excel (Swift)
Set up and configure output to Excelâ„¢ format from your reporting application. This option is useful if you want to perform custom calculations in an application such as Numbers.
Excel reports, as output from Genero Report Writer, do not print at high quality. If you require high-fidelity printing, use one of the other output options, such as SVG.
XLS
or XLSX
in the
selectDevice()
function.let rcPtr = createRuntimeConfiguration(reportDesignFileName)
selectDevice (rcPtr, XLS)
let rcPtr = createRuntimeConfiguration(reportDesignFileName)
selectDevice (rcPtr, XLSX)
If you are experimenting with the provided Swift demo, ensure you change the file
extension from the hard-coded "pdf
" to the appropriate Excel extension type
(.xls or .xlsx). On Mac® OS,
NSWorkspace.shared().open()
opens the document with the
application defined by the system file association.
Device-specific configuration functions
XLS
as the output, there are device-specific
configuration functions available: configureXLSDevice()
setXLSMergeCells()
XLSX
as the output, there are device-specific
configuration functions available: configureXLSXDevice()
setXLSXMergeCells()
These functions should be included after calling
the selectDevice()
function but before calling the
createContentHandler()
function.
For the full list of available functions, refer to the Genero Report Writer C API documentation.