Hello,
I'm pretty new to XWPF and maybe this does not always work, but I can tell
you that for a not very complex document the following code prints the
number of tables:
XWPFDocument doc = new XWPFDocument(new FileInputStream("mydoc.docx"));
System.out.println(String.valueOf(doc.getTables().size()));
HTH.
Pere
> -----Mensaje original-----
> De: vasavi [mailto:[email protected]]
> Enviado el: viernes, 29 de abril de 2011 6:40
> Para: [email protected]
> Asunto: count number of tables in a word document
>
> hi
>
> can any body tell how to count number of tables in word
> document using
> XWPF.
>
> --
> View this message in context:
> http://apache-poi.1045710.n5.nabble.com/count-number-of-tables
> -in-a-word-document-tp4357876p4357876.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
AVÍS DE CONFIDENCIALITAT: Aquest missatge i els seus documents adjunts, poden
contenir informació privilegiada i/o confidencial que està dirigida
exclusivament al seu destinatari. Si vostè rep aquest missatge i no és el
destinatari indicat, si us plau notifiqui-ho immediatament i remeti el missatge
original a l'adreça electrònica indicada. Qualsevol còpia, ús o distribució no
autoritzats d'aquesta comunicació queda estrictament prohibida.
AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden
contener información privilegiada y/o confidencial que está dirigida
exclusivamente a su destinatario. Si usted recibe este mensaje y no es el
destinatario indicado, por favor notifíquelo inmediatamente y remita el mensaje
original a la dirección electrónica indicada. Cualquier copia, uso o
distribución no autorizados de esta comunicación queda estrictamente prohibida.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]