apache poi - Reading .docx file in java -
i trying read 1 file in java, following code :
public void readfile(string filename){ try { bufferedreader reader= new bufferedreader(new filereader(filename)); string line=null; while((line=reader.readline()) != null ){ system.out.println(line); } }catch (exception ex){} } it working fine in case of txt file. in case of docx file, printing weird characters. how can read .docx file in java.
internally .docx files organized zipped xml-files, whereas .doc binary file format. can not read either 1 directly. have @ docx4j or apache poi.
if trying create or manipulate .docx file, try docx4j here source
or go apachepoi
Comments
Post a Comment