[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Content-type og format til Excel/OOCalc?



On Fri, 2006-01-20 at 16:05 +0000, Jesper Krogh wrote:
> Jeg har noget data fra en database jeg gerne ville downloade direkte til
> folks regneark. Jeg kan godt tvinge det ind i regnearket, men det bliver
> linie for linie og ikke i det tabelformat som jeg har lavet med
> komma-separeret data. 

Den slags data kaldes almindeligvis kommasepareret data, men i DK har
nogle tumber engang bestemt at det det være semikolon.

> Nogle der ved hvad den korrekte contenttype og format data skal have for
> at det vil lykkedes for mig? 

Jeg mener det er sådan her med for en DK Excel bruger:
<?php
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=payrole.csv");
?>2006-01-31;Hans Schou;1234,56
2006-01-31;Jesper Linuxpusher;2345,67

Se også http://dk.php.net/readfile
case "xls": $ctype="application/vnd.ms-excel"; break;

How can I export data in CSV or tab delimited format?
http://www.modwest.com/help/kb.phtml?qid=135&cat=6

OpenOfficeCalc er vist nogenlunde det samme, men det skal du nok lige
eksperimenterer med.

/hans



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-02-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *