0

I have a table in Word with POI-HWPF. Can I insert another table into a cell in the table?

centic
  • 15,565
  • 9
  • 68
  • 125
tracis
  • 1
  • 1

1 Answers1

1

The HWPF part of POI is not in a stable state. You will likely not be able to insert a table into a table cell.

I developed an improved HWPF library for one of my clients so I know about the internal details. The files created by the public HWPF are likely to crash Word if they are non-trivial. Having one table is already non-trivial and modifying nested tables will definitely produce invalid output files.

I don't know, whether you can use RTF files for nested tables. But if using RTF is an option for you, it may be worth trying. With doc files and HWPF you are out of luck.

Rainer Schwarze
  • 4,725
  • 1
  • 27
  • 49