Jump to content

write Excel>5 files with PHP?


neylitalo

Recommended Posts

With the PEAR Spreadsheet::Excel::Writer class, you can write Excel 5 (Excel 97) files, but Excel 5 had a nasty little restriction on the lengths of the values in the cells. Each cell has a maximum content length of 255 characters, not even near to the amount of data I need to store. So, my question for all of you: Have you used, seen, or heard of a PHP library that supports writing to Excel files greater than Excel 5?

Link to comment
Share on other sites

No, it's a Unix server, so that's out... (good idea, though) and I suppose I should have mentioned that I'm creating these Excel files from scratch, with information right out of a database. I've got next to no experience with COM, so I don't know if you can create new files with it.

Link to comment
Share on other sites

Also, can you split the data so it's in 255 char chunks and use multiple cells to represent the data?  I guess I'm curious about what kind of data you're storing that's more than 255 chars per cell.

Link to comment
Share on other sites

Are you utilising some of Excels advanced functionality, where a csv wouldn't suffice?

 

A CSV would indeed work, I'll look into that.

 

Also, can you split the data so it's in 255 char chunks and use multiple cells to represent the data?  I guess I'm curious about what kind of data you're storing that's more than 255 chars per cell.

 

Well, it can't really be split up - the data is from an electronic time-card system. Employees enter the amount of time spent on a particular task, an outline of the task, and the customer the task was for. For most employees, each "task" is a complete description of several hours spent at one of the many firms we do IT consulting for, so there are as many as twenty line-items; the largest description I've seen yet is just under 800 characters. This particular module is for invoicing and records - at the end of the month, the accounting staff runs a report on the different clients and the work performed for them, and it spits out an Excel document - for what purpose, I don't know.

 

The bottom line is that they're using Excel, I'm sure the CSV will work.

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.