internal > Feature (approved)

export tables as XML or csv-list / #460

Summary

v0.08
approved
Feb 16, 2006
2 hours ... 2 days
100%
Feb 17, 2006 / pixtur
Jan 19, 2007 / pixtur
burger
 

Attached files

No files uploaded
In some cases it would be quiet useful to export a complete list to another programm like Excell. Adding a csv-style to the BlockList-class should be pretty straight forward.

29 Comments

pixtur

burger

pixtur

burger

pixtur

burger

pixtur

burger

burger

pixtur

burger

pixtur

burger

burger

burger

pixtur

burger

pixtur

burger

burger

pixtur

burger

pixtur

burger

Nov 9, 2006
version 3
Changes
Hi Tom,

thanks for checking my changes and for your enhancements.

But I have some problems with your changes at std/export.inc.php:
  1. problem:
## cannot use .csv, because of format-errors
header('Content-Disposition: attachment; filename=' . $pagename . '.csv');

## therefore I changed it to
header('Content-Disposition: attachment; filename=' . $pagename . '.xls');
  1. problem:
## I have to use
$str = iconv("utf-8", "iso-8859-15", $str); 
## because if I don't use it then german characters aren't displayed correctely

Maybe it works with OpenOffice, but it don't works with Microsoft Excel. And I think most of the companies still use Microsoft Excel.
But if you have another idea to solve the problem with the german characters then please let me know.

pixtur

Nov 9, 2006
On UTF8 encoding...
When importing the csv-file, OpenOffice explicitly asks me for the Character Encoding. I don't have Excell here, but I would guess, that there is also an option to define the encoding. Using UTF8 will work for all characters without any conversion (also for chinese). If possible, we should be leave this road, even if we have to write into the docu, that the csv is utf8 encoded.

If there is absolutly no way of getting utf8 into Excell, I suggest a config option "EXPORT_CSV_ENCODING". Default is should be "UTF8". Another option should be "ISO8859-15".

madlyr

Nov 9, 2006
version 2
Reply to On UTF8 encoding...
Excel uses WIndows code pages. For example for Polish language it is Windows-1250, check M$ documentation, which country uses which code page.

In my opinion export to csv should be per person configurable.
In profile we could add combo - esport to csv in code page and there everybody could choose if he wants' export in utf-8, or windows or even iso-885x-x if this data will be imported to webpage in other software.

If we add export to xml, then it should be another combo, but I think most exports to xml will be in utf-8.


burger

Nov 9, 2006
Reply to On UTF8 encoding...
I made a little research at Google and found out that Microsoft Excel obviously don't supports UTF-8 encoding.

So what should we do?

pixtur

Dec 12, 2006
Ok.. let's keep it with "ISO8859-15".
I don't think we need an option for this.

pixtur

Jan 3, 2007
 

Comment / Update