Netbrain has uploaded a new change for review.

Change subject: Added support for exporting to Microsoft Office Excel file 
format
......................................................................

Added support for exporting to Microsoft Office Excel file format

This feature adds a dependency to my other extension PHPExcel (which is 
currently awaiting repository creation, see Extension:PHPExcel for more 
information)

This feature was developed as to enable importing to excel without loosing
data integrity, as one would by using CVS export functionality.

If you tried to import from cvs a cell that contained the data "0320" excel
would auto interpet this as a number instead of a string effectively setting
the cell value to "320". One could workaround this by setting each columns 
datatype in the import screen of excel, however this leaves that responsibility 
to the user which is bad.

However using SMW data type information and PHPExcel library, it is possible
to explicitly set each cells data type. As of now 3 datatypes has been
defined.

Quantity: Displaying the data as a number and formatting the cell with the
specified unit type. (e.g the data "100 tons" will be set as 100
and displayed as "100 tons")

Number: Setting the data as a number

String (everything else): Displaying the data as a string
(e.g "0320" would actually be "0320")

Example usage:
{{#ask: [[Category:...]]
| ?var1
| ?var2
| ?var3
| format=excel
}}

In the case where a user tries to export as excel and the extension PHPexcel
is not installed on the system. The user will be prompted with a error message
detailing the missing extension.

Change-Id: I18d1078e998ea0cb2517417d0c50197a326825cd
---
A includes/queryprinters/SMW_QP_Excel.php
1 file changed, 148 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/72/43172/1
--
To view, visit https://gerrit.wikimedia.org/r/43172
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18d1078e998ea0cb2517417d0c50197a326825cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Netbrain <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to