0

Is it possible? Currently, I am inserting data to a CSV file using PHP via the fputcsv() function. When opened in Excel, it works fine. The problem is that all the columns are of the default size. Is there a way to autofit the column width and possibly modify the formatting of the data(font size,color,alignment) in the cells as well?

2
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by martin11ph
0

Not while you are using a CSV file. If you use a tool such as PHPExcel, which can generate a real Excel file, then it is possible.

0

I was afraid of that. Thank you for answering. I have already downloaded PHPExcel and am going to study it for now. Gonna leave the thread open in case there are other suggestions. :)

0

Oh well I realized PHPExcel is good and useful. I'll just close and suggest it for people who want the same done.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.