incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asier CD." <>
Subject Copy table
Date Wed, 25 Apr 2012 16:04:02 GMT

I'm creating a documento which must have some simple tables - a detail
list, 2 columns, undetermined number of rows- so I've created a
template file with an empty table (with some formatting) so the idea
is to copy the empty table, set it's name and add the rows, but I
don't know how to copy a table.

I'm using odftoolkit.simple

public void fill(TextDocument doc, List<SpecDetail> specs) {
    final Table st =

    // Copy table - how to do it?
   // final Table newTable =

   // Fill table
   for (SpecDetail specDetail : specs) {
     for (DetailLine line : specDetail.lines() {
        this.addRow(newTable, line.getKey(), line.getValue());

  // Remove the table


View raw message