for (int i = 0; i < minCeofSize; i++)
pTmpImage[i] = pSrcCoef[i];
int gap = minCeofSize;
for (int i = decLevel; i >= 1; i--)String filename="demo", fileContent="中文内容测试";
XWPFDocument document = new XWPFDocument();
XWPFParagraph tmpParagraph = documentcreateParagraph();
XWPFRun tmpRun = tmpParagraphcreateRun();
tmpRunsetText(fileContent);
tmpRunsetFontSize(18);
FileOutputStream fos = new FileOutputStream(new File(filename + "docx"));
documentwrite(fos);
fosclose();
javac -encoding utf8 PoiDemojava
生成的docx,中文正常
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)