Help:Excel format

Excel format
Outputs the result in Microsoft Office Excel file format (xls).
Further Information
Provided by: Extension "Semantic Result Formats"
Added: 1.9.0
Removed: 3.0.1
Requirements: "PHPSpreadsheet" library (handled by Composer)
Format name: excel
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. yes
Authors: Netbrain
Categories: export
Table of Contents
The underlying PHPExcel library was deprecated and replaced by the PHPSpreadsheet library.1 Thus this result format was replaced by result format "Spreadsheet"Outputs the result in spreadsheet file formats (xlsx, xls, ods and csv). starting with version 3.1.0 of extension "Semantic Result Formats"Provides additional formats for semantic queries.2. When upgrading make sure that you replace the line
 "phpoffice/phpexcel": "~1"
by line
 "phpoffice/phpspreadsheet": "~1"
in your "composer.local.json" file. Also note that the previous result format identifier "excel" is now an alias to "spreadsheet".

The result format spreadsheet is used to format query results as a spreadsheet. It is similar to the csv format except that value types are now explicitly handled. Previously one could export to csv and then import to a spreadsheet, however values could be wrongly interpreted as numbers when they were in fact strings. This format fixes that issue.

Since version 1.9.1 of extension "Semantic Result Formats"Provides additional formats for semantic queries this format will automatically be available if the required PHPExcel library is installed.

In version 3.0.1 of extension "Semantic Result Formats"Provides additional formats for semantic queries the "excel" format identifier and PHPExcel library was replaced with the "spreadsheet" format identifier and the PHPSpreadsheet library.


A fatal error occurred in the #smwdoc parser function


This result format is not available on this wiki. Thus an example output cannot be provided.
 [[located in::Germany]] 
 |?Area#km² = Size in km²
 |searchlabel=Download result as xls-file for MS Excel


This section describes how to install the required PHPSpreadsheet library with Composer. To do this add the following as the last line of the "require" section in your "composer.local.json" file not forgetting to add a comma to the end of the preceding line:

"phpoffice/phpspreadsheet": "~1"

Now run the following command from the root directory of your wiki to complete the installation:

composer update --no-dev


  1. ^  Semantic Result Formats: GitHub issue gh:srf:382
  2. ^  Semantic Result Formats: GitHub pull request gh:srf:445