# PHP & Excel

**URL:** <https://forum.kirupa.com/t/php-excel/111539>\
**Category:** Uncategorized\
**Created:** [May 28, 2004, 12:06am UTC](https://forum.kirupa.com/t/php-excel/111539 "2004-05-28T00:06:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RageW0lf](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@RageW0lf](https://forum.kirupa.com/u/RageW0lf)\
**Post date:** [May 28, 2004, 12:06am UTC](https://forum.kirupa.com/t/php-excel/111539/1 "2004-05-28T00:06:51Z")

</div>

I have a form made in PHP.

On completing the form the data is enterred into an Excel file with some of the PHP code contained within the form.

Everything works fine apart from the lines in Excel are not spaced properly & the headings aren’t formatted in bold etc. This is a bit of a pain in the \*\*\*\*\*, as evertime I download the file and filter the entries, I have to space everything out again and it looks messy unless I format the headings!

Currently the Excel file I am putting the data into is saved as a “text - tab delimited” Excel file. It won’t enter the data if I save it as a _normal_ excel file, but it appears that this is the only way I can keep the headings and cell spacing in a formatted manner.

_ **Is there anyway I can keep the formatted cells & headings within Excel and enter the data with the formatted headings & cells already in place?** _

If it’s not possible please let me know!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 3:02am UTC](https://forum.kirupa.com/t/php-excel/111539/2 "2004-05-28T03:02:45Z")

</div>

There is a PEAR class and also some other excel classes at [phpclasses.org](http://phpclasses.org) . I have not used the PEAR class, but used a mySQL2Excel class and it was fine, with proper headings and everything. I think you might look into more direct methods rather than a comma delimited file.  
[http://pear.php.net/package/Spreadsheet\_Excel\_Writer](http://pear.php.net/package/Spreadsheet_Excel_Writer)

You may have to get the admins to install this class.
