Hi Guillaume Maillard ,

Ya sure, I have attached the  template file as input.odt and it's
output as output.odt  file.
Please find the files which attached at url 
http://groups.google.com/group/jopendocument/files


 I used the following code

  public class CreateFile {

    public static void main(String[] args) {
        try {
            File templateFile = new File("input" + ".odt");
            File outFile = new File("output" + ".odt");
            final ODSingleXMLDocument single = new ODPackage
(templateFile).toSingle();
            Element elementTable = single.getDescendantByName
("table:table", "personal");
            Table<ODSingleXMLDocument> table = new
Table<ODSingleXMLDocument>(single, elementTable);
            table.getCellAt(0, 1).setValue("1");
            table.getCellAt(1, 1).setValue("jai");
            table.getCellAt(2, 1).setValue("12 North Car Street");
            table.getCellAt(3, 1).setValue("123456789");
            single.saveAs(outFile);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


Regards,
Jai

Reply via email to