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
https://forums.phpfreaks.com/topic/60409-write-excel5-files-with-php/
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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.