Mr/Mrs?:
  
  
 greetings, I'm using Java to develop a search machine to search Strings in an 
.ods(Openoffice's Excel),I'm using Eclipse Ganymede.
 But I don't know how to read the file.
 Could you please tell me which file to download and how to install and then 
how can I "import com.sun.star......etc"
  
 You can also tell me how to use it in another way.
  
 I've got a code:
  odfPackage = (SpreadsheetDocument) 
OpenDocumentFactory.load("dhdolmetscher.ods");
 Document doc = odfPackage.getDocument(OdfPackage.STREAMNAME_CONTENT);
 Element root = doc.getDocumentElement();
 NodeList children = root.getElementsByTagName("table:table");
  
 try{
 NodeList children = root.getElementsByTagName("table:table");
 NodeList column_children = ((Element) 
children.item(0)).getElementsByTagName("table:table-column");
 NodeList cell_children = ((Element) 
column_children.item(0)).getElementsByTagName("text:p");
 int suchi;
 String check;
 check=cell_children.item(suchi).getTextContent();
 }
  
 but it is not so easily to visit cells just with two positions, 
 and it really sucks because it always returns with 
"java.lang.NullPointerException"
  
  
  
 best regards
 Kevin Xu

Reply via email to