Apache POI for Word Documents

7 vues (au cours des 30 derniers jours)
Amit Prajapati
Amit Prajapati le 6 Avr 2017
Modifié(e) : Itaka le 10 Juin 2018
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 commentaire
Itaka
Itaka le 10 Juin 2018
Modifié(e) : Itaka le 10 Juin 2018
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();

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by