## Command Line Export |

| JProfiler's command line export facility allows you to take a saved snapshot and export a number of views as HTML, CSV or XML. This is especially convenient if you use offline profiling and wish to generate reports in an automated fashion. Views with an interactive selection process like the heap walker or the method graph cannot be exported with this method. There are two ways to use the command line export: with the special command line executable with the ant task In both cases you specify a number of view names together with a set of options. Each view has its own set of options. The options can be used to adjust the presentation and the displayed data. For each GUI component in JProfiler that lets you choose the displayed data, like aggregation level or thread selection, an option is provided that allows you to perform the same selection for the command line export. Most views in JProfiler support multiple output formats. By default, the output format is deduced from the extension of the output file: .html export as HTML file. Note that a directory named `jprofiler_images` will be created that contains images used in the HTML page. .csv export as CSV data, the first line contains the column names. Note: When using Microsoft Excel, CSV is not a stable format. Microsoft Excel on Windows takes the separator character from the regional settings. JProfiler uses a semicolon as the separator in locales that use a comma as a decimal separator and a comma in locales that use a dot as a decimal separator. If you need to override the CSV separator character you can do so by setting -Djprofiler.csvSeparator in `bin/export.vmoptions`. .xml export as XML data. The data format is self-descriptive. If you would like to use different extensions, you can use the format option to override the choice of the output format.

| When you save a snapshot, the session configuration is saved in the snapshot file. The snapshot loses the connection to the session configuration under which is was recorded. For this reason, you cannot edit the view settings in the original session to change presentation aspects of the HTML export. With the global session option, you can specify a session id whose view settings should be used for the export. The session id can be found in the application settings next to the session name.

| The export will fail if the specified snapshot file does not exist you specify an unrecognized option you specify an unrecognized view name the output file cannot be written an option has an invalid value an option leads to an invalid selection in JProfiler, e.g. if a class cannot be found You can choose to ignore errors by using the global ignoreerrors option.