Java and Microsoft Word File Format Questions

-Where can I go to download the .jar files for Apache POI HWPF, Java Mircrosoft Word file support, and the associated javadoc files? I cannot gather what is what, on the suggested download website, https://github.com/apache/poi

-Is HWPF presently worked on or maintained?

-Can I use HWPF to insert or remove Image or BufferedImage files, such as a .bmp or a .jpg file,
and then save, update, the associated change in the .doc file?

-Where can I go to download the .jar files for Apache POI HSSF, Java Microsoft Excel file support and the associated javadoc files? I cannot gather what is what, on the suggested download website

-Is HSSF presently worked on or maintained?

-Can I use HSSF do add or remove graph images in a .xls file? Can I use HSSF to insert or delete image files into a .xls file? Can I use it to add or remove sheets in one .xls file? Can I use it to do cell formatting,
such as colouring, border changing, text bolding, similar, in one .xls file?

@Z12345,

-Where can I go to download the .jar files for Apache POI HWPF, Java Mircrosoft Word file support, and the associated javadoc files? I cannot gather what is what, on the suggested download website, GitHub - apache/poi: Mirror of Apache POI

  1. Go to Apache POI - Download Release Artifacts
  2. Scroll down to Binary Distribution section and click on poi-bin-5.1.0-20211024.zip
  3. Download the zip file from the suggested site e.g. https://dlcdn.apache.org/poi/release/bin/poi-bin-5.1.0-20211024.zip
    Once downloaded, extract the zip to disc.
  4. Create a Maven Project in Eclipse with the following settings:
    <groupId>org.apache.poi
    <artifactId>poi-scratchpad
    <version>4.0.0
  5. Add the jars from the extracted zip file to the project as external libraries.
  6. You will also need to add dependencies for log4j-core. You can do this by adding following to your pom.xml file.
    <dependency>
    <groupId>org.apache.logging.log4j
    <artifactId>log4j-api
    <version>2.11.2
    </dependency>

<dependency>
<groupId>org.apache.logging.log4j
<artifactId>log4j-core
<version>2.11.2
</dependency>

Once done, you can execute the following code to work with Microsoft Word .doc files.

    public static void setDocProperties(String filename) throws IOException {
        System.out.println("filename = [" + filename + "]");
        FileInputStream fis = new FileInputStream(new File(filename));
        HWPFDocument doc = new HWPFDocument(fis);

        SummaryInformation summaryInformation = doc.getSummaryInformation();
        summaryInformation.setAuthor("Thomas");
        summaryInformation.setLastAuthor("Adam");
        DocumentSummaryInformation documentSummaryInformation = doc.getDocumentSummaryInformation();
        documentSummaryInformation.setCompany("Aspose");
        documentSummaryInformation.setDocumentVersion("1");

        FileOutputStream fos = new FileOutputStream(new File(filename));
        doc.write(fos);

        fos.close();
        doc.close();
        fis.close();
    }

Is HWPF presently worked on or maintained?

The recent commits to official repo of Apache/POI does show some activity which shows that it is been worked on. Please check the change log for further details.

Can I use HWPF to insert or remove Image or BufferedImage files, such as a .bmp or a .jpg file,
and then save, update, the associated change in the .doc file?

A generic search on internet didn’t show up any such example for working with BufferedImage files. However, this UnitTest of HWPFPicture may be of help.

-Where can I go to download the .jar files for Apache POI HSSF, Java Microsoft Excel file support and the associated javadoc files? I cannot gather what is what, on the suggested download website

Please use the same steps as mentioned for HWPF.

-Is HSSF presently worked on or maintained?
Yes, as can be seen from the changelog mentioned above

Can I use HSSF do add or remove graph images in a .xls file? Can I use HSSF to insert or delete image files into a .xls file? Can I use it to add or remove sheets in one .xls file? Can I use it to do cell formatting,
such as colouring, border changing, text bolding, similar, in one .xls file?

We belive some or all of these can be achieved as shown in the HSSF and XSSF Example.

Happy Contributing!
File Formats Team