Help:CSV format

From semantic-mediawiki.org
Jump to: navigation, search
CSV format
Outputs semantic data in Windows-style Comma Separated Value format
Further Information
Provided by: Semantic MediaWiki
Added: 1.2.1
Removed: still supported
Requirements: none
Format name: csv
Enabled by default:info.pngIndicates whether the result format is enabled by default upon installation of the respective extension. yes
Authors: Nathan Yergler, Markus Krötzsch
Categories: export, plaintext
Table of Contents


The result format csv is used to produce links to CSV files.

Parameters

Parameter Type Default Description
searchlabel Text no The text for the link to results
sep Text , The separator to use
  • sep: the character to be used to separate values. Default - comma («,»). Note that if space (« ») is specified as the separator, the underscore («_») character will be used instead.
  • headers: setting this parameter to 'hide' removes the header row that is displayed in versions 1.4.3 and greater of SMW. The default value is 'show'.

Examples

{{#ask: [[Category:City]] [[located in::Germany]] 
| ?population
| format=csv
}}

Result: CSV

The same query, but this time, we're using tilde («~») as the separator.

{{#ask: [[Category:City]] [[located in::Germany]] 
| ?population
| format=csv
| sep=~
}}

Result: CSV

Remarks

On most platforms, CSV files will be automatically opened by the default spreadsheet program.



This documentation page applies to all SMW versions from 1.2.1 to the most current version.
      Other languages: defrruzh-hans

Help:CSV format en 1.2.1


Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox