Jump to content

PHP -> Excel


Derleek

Recommended Posts

can you just use the file manipulation commands in PHP and save the file as a .xls?

 

Yes, you can.  You'll also have to find the specification for what the correct Excel file format is and put it in that format.

 

Or you can put it in a CSV file as suggested since Excel understands CSV.

 

Or you can just use one of the many PHP-to-Excel libraries.  I don't see what the big deal with installing one is unless your shared host is a turd.

Link to comment
Share on other sites

PHPExcel is good.  It's very easy to use and works correctly.  I attempted to create a very large spreadsheet with it once and performance suffered though.  I recommend it for small to medium files.

 

There is a PEAR Spreadsheet class as well which is good also.

 

I don't understand your boss's design restriction against plug-ins.  Unless he is an engineer or developer himself, his only concern should be if you can get it done and if there's a library that already exists that:

1) Will get it done faster

2) He can use commercially

Then I don't see what the problem is.

 

Then again my boss has absolutely zero experience designing software and he likes to force arbitrary design decisions on me as well.  It's his way of putting his "personal stamp" on the project and rarely does it work out well for either of us.

Link to comment
Share on other sites

yes, he is a developer.

 

His main concern is that he does not want to be tied into something that can go away.

 

His Fear:

 

We start to rely on an extension -> The project dies -> we find a bug -> our stuff breaks and we can't get support.

 

Understandable...  For bigger extensions.

 

I don't think PEAR is going away any time soon so that one should be fine.  It looks pretty light-weight too.

Link to comment
Share on other sites

Exporting a spreadsheet to XML gives a pretty good idea on how to go from XML -> Excel.

 

He's actually approved the pear excel conversion class...

 

It's a pretty easy extension.

 

Although, I am having (conceptual) problems transferring the data returned by my AJAX queries to the PHP script to export to excel... it'll fall into place soon though =)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.