Apache POI for Word Documents

조회 수: 7 (최근 30일)
Amit Prajapati
Amit Prajapati 2017년 4월 6일
편집: Itaka 2018년 6월 10일
Hi, I have a Matlab function which uses actxserver() to write to a MS Word file. But the issue is this won't work on a UNIX box. Can you please suggest some alternatives to this? I have started to explore Apache POI for the same but couldn't find any examples for the same.
  댓글 수: 1
Itaka
Itaka 2018년 6월 10일
편집: Itaka 2018년 6월 10일
import org.apache.poi.xwpf.usermodel.*;
docFile = java.io.File('docFile.docx');
fileIn = java.io.FileInputStream(docFile);
Doc = XWPFDocument(fileIn);
---------------------------
fileOut = java.io.FileOutputStream(docFile);
Doc.write(fileOut);
fileOut.close();
Doc.close();

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by