Exceptioninthread"main"java.lang.ExceptionInInitializerErroratjavaapplication2.WordHandle.(WordHandle.java:33)atjavaapplication2.JavaApplication2.main(JavaApplicati...
Exception in thread "main" java.lang.ExceptionInInitializerError
at javaapplication2.WordHandle.(WordHandle.java:33)
at javaapplication2.JavaApplication2.main(JavaApplication2.java:18)
public class JavaApplication2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
WordHandle word = new WordHandle();
try
{
word.open("D:test.doc", false);
System.out.println(word.getTableNum());
word.setCurrentTable(1);
word.replaceCell(1, 2, "old Name");
word.saveAs("D:test1.doc");
word.close();
word.quit();
}
catch (Exception e)
{
}
}
}
展开