---
Product: Aspose.PDF
Platform: java
Page Type: index
Canonical URL: https://blog.aspose.org/pdf/java/convert-pdf-to-excel-and-markdown-java/
Published: 2026-10-09
Author: Aspose
---

# Convert PDF to Excel and Markdown with Aspose.PDF FOSS for Java

Aspose.PDF FOSS for Java 26.9.0 adds PDF-to-Excel and PDF-to-Markdown conversion, with ExcelSaveOptions and MarkdownSaveOptions controlling the export, and ExcelLoadOptions/MarkdownLoadOptions for converting back to PDF. This post covers the new conversion APIs in the MIT-licensed library.

## Introduction

This post shows how to convert a PDF to an Excel workbook or a Markdown document, and
back again, with the new conversion APIs in Aspose.PDF FOSS for Java 26.9.0. Both
directions are supported — a PDF can be exported to an editable workbook or a Markdown
document, and an edited workbook or Markdown file can be converted back into PDF.

This is useful whenever a PDF is the wrong format for the next step in a workflow: a
reviewer who needs to edit tabular data in a spreadsheet, or a writer who needs the
text content in a plain-text, version-control-friendly format.

Aspose.PDF FOSS for Java is MIT-licensed and has no external dependencies.

---

## What's Included

### Export to Excel

`Document.save` with `SaveFormat.Xlsx` converts a PDF to a workbook. `ExcelSaveOptions`
controls the shape of the output — most importantly, whether pages are merged onto
fewer worksheets or kept one-per-sheet:

```java
import org.aspose.pdf.Document;
import org.aspose.pdf.ExcelSaveOptions;

try (Document doc = new Document("report.pdf")) {
    ExcelSaveOptions options = new ExcelSaveOptions();
    options.setFormat(ExcelSaveOptions.ExcelFormat.XLSX); // default
    options.setMinimizeTheNumberOfWorksheets(true);        // merge pages onto fewer sheets
    options.setInsertBlankColumnAtFirst(false);            // no leading spacer column
    options.setUniformWorksheets(false);                   // allow per-sheet column widths
    options.setStructuralHeuristics(true);                 // recover tables on untagged PDFs
    options.setSuppressRunningHeadersFooters(true);         // drop repeated page furniture
    doc.save("report.xlsx", options);
}
```

### Export to Markdown

`MarkdownSaveOptions` controls the Markdown export in a similar way, with options for
recovering document structure and handling embedded graphics:

```java
import org.aspose.pdf.Document;
import org.aspose.pdf.MarkdownSaveOptions;

try (Document doc = new Document("article.pdf")) {
    MarkdownSaveOptions options = new MarkdownSaveOptions();
    options.setStructuralHeuristics(true);          // recover headings/lists/tables
    options.setSuppressRunningHeadersFooters(true);  // drop repeated page furniture
    options.setRasterizeVectorGraphics(true);        // charts/shapes -> referenced images
    doc.save("article.md", options);
}
```

### Convert Back to PDF

`ExcelLoadOptions` and `MarkdownLoadOptions` are passed to the `Document` constructor
to load a workbook or Markdown file and convert it back to PDF:

```java
import org.aspose.pdf.Document;
import org.aspose.pdf.ExcelLoadOptions;

try (Document doc = new Document("book.xlsx", new ExcelLoadOptions())) {
    doc.save("book.pdf");
}
```

---

## Quick Start

```xml
<dependency>
  <groupId>org.aspose</groupId>
  <artifactId>aspose-pdf-foss</artifactId>
  <version>26.11.0</version>
</dependency>
```

Add the dependency above, then convert a PDF to XLSX in a few lines using
`SaveFormat.Xlsx` — no extra options needed for a basic export:

```java
import org.aspose.pdf.Document;
import org.aspose.pdf.SaveFormat;

try (Document doc = new Document("report.pdf")) {
    doc.save("report.xlsx", SaveFormat.Xlsx); // SaveFormat.Excel is an alias
}
```

---

## Supported Formats

| Format | Extension | Read | Write |
|--------|-----------|------|-------|
| PDF | pdf | ✓ | ✓ |
| Excel | xlsx | ✓ | ✓ |
| Markdown | md | ✓ | ✓ |

---

## Open Source & Licensing

Aspose.PDF FOSS for Java is MIT-licensed and available at
`https://github.com/aspose-pdf-foss/Aspose.PDF-FOSS-for-Java`. Commercial use is
permitted under the MIT license terms. If your project requires enterprise-grade
support, extended format coverage, or cloud integration, the
[Aspose.PDF — Enterprise Product Family](https://products.aspose.com/pdf/) is a
separate commercial offering.

---

## Getting Started

- [Convert PDF to Excel and Markdown (Developer Guide)](https://docs.aspose.org/pdf/java/developer-guide/conversion/)
- [How to Convert a PDF to an Editable Excel Workbook](https://kb.aspose.org/pdf/java/how-to-convert-pdf-to-excel-java/)
- [Getting Started](https://docs.aspose.org/pdf/java/getting-started/)
- [API Reference](https://reference.aspose.org/pdf/java/)

## Related Resources

- [Aspose.PDF — Enterprise Blog](https://blog.aspose.com/)