LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-10-2005, 09:09 PM   #1
lucesei
LQ Newbie
 
Registered: Sep 2005
Posts: 7

Rep: Reputation: 0
PHP: export data to openoffice calc


Hi, here's my question: to export data to an excel file, I use the the following header:
Code:
header ("Content-Type: application/vnd.ms-excel");
//Other code follows....
Now I need to export to an openoffice calc file (*.sxc). I guess I only need to change the "vnd.ms-excel" with something else, but what?

Thanks a lot for any help and bye.
 
Old 12-10-2005, 10:08 PM   #2
spoody_goon
Member
 
Registered: Sep 2003
Location: Michigan USA
Distribution: Mandrake, DamnSmallLinux, VectorLinux
Posts: 416

Rep: Reputation: 30
Wouldn't it be easier to just stay in the excel format. Do you realize Open Office has no problem reading excel sheets?
I realize I didn't answer you question, but the only thing that would change would be the program you open the file with.

Just an idea
 
Old 12-11-2005, 12:12 AM   #3
lucesei
LQ Newbie
 
Registered: Sep 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Wouldn't it be easier to just stay in the excel format. Do you realize Open Office has no problem reading excel sheets?
I realize I didn't answer you question, but the only thing that would change would be the program you open the file with.
Thanks for your thoughts.
Yes, I know more than well that OO can read *.xls files. I use it both under Windows & under Linux.The reason why I want the users of my script to be able to save data as an OO calc file, is a matter of coherency. Excel format is Ok when you want to save data to a Windows box, but if you are using Linux, then what is the point of saving a file in a format that has nothing to do with this OS? Any other program that runs under Linux would be fine, I just chose OO since it's the (I think?) most widely used. Following your idea and to make an example, why bother compressing data as tar, gzip, bzip, etc, etc... when Linux can also work with Windows 'zip' files? Simply because any method of compression is better than the old 'zip'? Well, OO calc is also better than Excel... Let's all forget any other method of compression and use the Windows standard! I'm sure you agree with me that this isn't the right way of behaving.

Anyway, the truth is, that I have spent hours searching Google without going anywhere, I have left messages for help in all the on-topic forums I know of, and after a week, noone has still been able to give me an answer. As a matter of fact, I especially thank you because you have been the only one to have at least said something.

I think I'll write a mail to the OO programmers, the only alternative there's left.

Bye bye
 
Old 12-11-2005, 12:28 AM   #4
lucesei
LQ Newbie
 
Registered: Sep 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Oh, by the way, some smart ass who knows how to search Google WAY BETTER than me, has just come up with the answer:
PHP Code:
header('Content-type: application/vnd.sun.xml.calc'
Just in case someone was curious.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Export data from Evolution to Openoffice mcle Linux - Software 2 08-21-2011 06:26 PM
Openoffice calc dajomu Linux - Software 1 10-27-2005 05:56 PM
OpenOffice Calc export chart to image file? cast55 Linux - Software 2 03-15-2005 10:51 AM
openoffice calc question... marsques Linux - Software 2 07-10-2004 04:30 PM
data import into openoffice calc general4172 Linux - Software 0 09-24-2003 12:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration