Php_excel07- how to replicate properties of one row to the next row

I need an application to export to xlsx, so I use php_excel07. Everything works fine, but I ran into a little problem, and I like: "I want to replicate the properties of a string to the next string." For Ex, if I have a line num 1 with a predetermined height, width, color and borders, etc., Then the same properties of line 1 should be replicated to the next line ie, row2 .. Here it is all the same for that.

+3
source share
1 answer

Without knowing the details of your style: manually read the appropriate properties from the first row / cells of the first row and set them to the second. There is no explicit method provided for cloning styles from one line to another.

However, if all the cells in the first row are identical, you can apply this style to a range of cells, rather than doing it individually.

Personally, I create arrays of styles that I can then replicate where I need them.

Worksheet Methods:

duplicateStyle()
duplicateStyleArray()

and style method:

applyFromArray()

may be useful.

0
source

Source: https://habr.com/ru/post/1768558/


All Articles