vandeseer / easytable

Small table drawing library built upon Apache PDFBox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question/Feature Request: Cell to be vertically or horizontally split into more small cells

FlyingDutchmanLQY opened this issue · comments

Hello!
Can a cell be split vertically or horizontally into more small cells?
Or multiple cells merged into big one like excel does?

something like below
image

Hi,

Yes, you can merge cells. Please check the examples, there you can also find some code for it.

Theoretically you can also create tables within single cells, but I wouldn't necessarily recommend that approach.

Best
Stefan

Sorry, bad English. Didn't fully understand the meaning of 'span'.
The example is great. But with regard to merge, can I merge cells after all the cells and rows being added, which means after the table builder finishes building.
I have to add cells and rows in a loop and after that merge some of the cells.

No, that doesn't work. It also would render the builder useless. You would need to keep track of the cells to be merged before building.

Best,
Stefan