Scroll

Global Event: OnExportCsvCell

Called prior to exporting a CSV cell for the purpose of overriding the standard export results. If the server event is defined, it is called for every visible cell in a report on CSV export. Allows for customizing cell contents on a cell-by-cell basis.

Signature

For custom code the args array is structured as follows:

args[] is contains two objects: The first argument args[0] is the Cell object in its entirety, which contains a variety of cell attribute information including row and col indices, cell type, format, convenience flags, linked report data, etc. The second argument args[1] provides the raw text of the cell as a string.

For .Net Assemblies the method signature is as follows:

string EventHandlerName(SessionInfo sessionInfo, Cell cell, string rawCellText)

Expected Return

The event expects a string or null return value. If null is returned, the event will interpret this as a flag indicating that no custom CSV data is being provided, and to return the report's CSV output. If a string is returned (including an empty string), the cell will output the string as provided, overriding the report data for that cell.

Example

string rawCellText = (string) args[1]; // this is the raw cell text
return "\"" + rawCellText + "\""; // return the cell contents, INCLUDING surrounding quotes

Hidden Article Information

Article Author
Exago Development
created 2017-02-21 16:13:14 UTC
updated 2017-06-27 14:46:23 UTC

Labels
Server Events, event handlers, list of server events, export, cell, exportcsvcell, exportcell, csvcell, CSV,
Have more questions? Submit a request