N
N
Nikita Tratorov2013-04-08 11:27:09
PHP
Nikita Tratorov, 2013-04-08 11:27:09

PHP->Excel Applied Styles Display Problem

Maybe someone came across:
Data is being exported to Excel 2007 using PHPExcel 1.7.8. Styles are applied to them in the process by the ApplyFormatCell() function.
But when you open a file, then, for example, line wrapping inside a cell is not displayed until you go into it and press Enter .

Those. it turns out that the format is assigned to the cell, but it is not displayed until you pretend that you have edited the cell.
A similar “parsley” applies to the cell data format (date, money, etc.).

Everything was done according to the working example from the site. The forum did not find anything about this problem. Hope for those Khabrovites who stepped on this rake.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Tratorov, 2013-04-08
@NikitaTratorov

And the casket just opened.
The cell format should only be applied after styles have been applied to the table.
Those. first SetSharedStyle(), and only then ApplyFormatCell().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question