How to extract text from word file .doc,docx,.xlsx,.pptx php

Here is a simple class which does the right job for .doc/.docx , PHP docx reader: Convert MS Word Docx files to text. class DocxConversion{ private $filename; public function __construct($filePath) { $this->filename = $filePath; } private function read_doc() { $fileHandle = fopen($this->filename, “r”); $line = @fread($fileHandle, filesize($this->filename)); $lines = explode(chr(0x0D),$line); $outtext = “”; foreach($lines as … Read more

Is there a Java API that can create rich Word documents? [closed]

In 2007 my project successfully used OpenOffice.org’s Universal Network Objects (UNO) interface to programmatically generate MS-Word compatible documents (*.doc), as well as corresponding PDF documents, from a Java Web application (a Struts/JSP framework). OpenOffice UNO also lets you build MS-Office-compatible charts, spreadsheets, presentations, etc. We were able to dynamically build sophisticated Word documents, including charts … Read more