Make #rspan when same data.

Hello, I can’t find a way to make this, I want to know if it’s possible to make two (or more) cells from the same column be one if the data inside the cell is the same.
I attach an image of what I want to do.

(I’m talking about the Date, they should agroup if they have the same data inside.)

Thanks you very much!!

You will have to iterate through all the rows in your column using the forEachRow function: … foreachrow

comparing the values of the cells using the getValue() method: … t_getvalue

and then apply the rowspans accordingly to the values with setRowSpan() method … setrowspan