Topics: Developer Forum
Jul 27, 2007 at 1:27 AM
Hi there!
First of all congratulations for this great PHP Class that generate MS-Excel files. Does anyone can help me how can I format a cell ? I do not have too much experience using Classes and I´m having difficult on it.
Thank you.
Jul 27, 2007 at 7:18 PM
Edited Jul 27, 2007 at 7:19 PM
Hello Aldo!
Run 05featuredemo.php in the Tests directory and open the generated file. Then, open 05featuredemoinc.php in your favorite editor and study it to see how PHPExcel formats the cell. Play around and change stuff like borders and fill colors in 05featuredemoinc.php. Open the respective files in /Classes/PHPExcel/Style to see what you can choose between. For example, in Border.php you can see:

/* Border style */
const BORDER_NONE = 'none';
const BORDER_DASHDOT = 'dashDot';
const BORDER_DASHDOTDOT = 'dashDotDot';
const BORDER_DASHED = 'dashed';
const BORDER_DOTTED = 'dotted';
const BORDER_DOUBLE = 'double';
const BORDER_HAIR = 'hair';
const BORDER_MEDIUM = 'medium';
const BORDER_MEDIUMDASHDOT = 'mediumDashDot';
const BORDER_MEDIUMDASHDOTDOT = 'mediumDashDotDot';
const BORDER_MEDIUMDASHED = 'mediumDashed';
const BORDER_SLANTDASHDOT = 'slantDashDot';
const BORDER_THICK = 'thick';
const BORDER_THIN = 'thin';

Those are the borders style you can choose between.
I hope that helped.
Jul 27, 2007 at 9:53 PM
Hi there Husker. Thank you for your help!

Well, I do not have a Tests directory here.
Inside my PHPExcel folder, I have these directories:
-Calculation, Cell, Reader, RichText, Shared, Style, Worksheet and Writer.

Is there any place on this site to download this test files? Please, let me know if possible, ok.
Thank you so much.

My best regards,

Jul 27, 2007 at 9:57 PM
Husker, sorry.

Please ignore my last post.
I found the directory with all those interesting files!
Thank you for your help!

I will read the PHP files!!!!
See ya around!