OneNote to Excel Java

OneNote notebooks are used to create digital notes to keep things organized. They can be useful to increase the productivity of teachers, students, or other professional people. In certain use cases, you may intend to convert a OneNote .one notebook to an Excel worksheet. This article explains how to convert a Microsoft OneNote .one file to XLSX or XLS format in Java.

OneNote .one Notebook to Excel Converter – Java API Installation

You can convert a OneNote file to an Excel file in two steps. Firstly, export the .one file to a PDF document using Aspose.Note for Java API. Secondly, convert the output PDF file to a Excel file using Aspose.PDF for Java API. You can get the JAR files from the Downloads, or use the following Maven configurations in pom.xml file of your project:

Repository:

 <repositories>
    <repository>
        <id>AsposeJavaAPI</id>
        <name>Aspose Java API</name>
        <url>https://repository.aspose.com/repo/</url>
    </repository>
</repositories>

Dependency:

 <dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-note</artifactId>
        <version>22.7</version>
        <classifier>jdk17</classifier>        
    </dependency>

    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-pdf</artifactId>
        <version>22.7</version>
    </dependency>
</dependencies>

Convert OneNote .one Notebook to Excel XLSX or XLS File in Java

You can convert a OneNote Notebook with .one file extension to an Excel file with the following steps:

  1. Create an object of ByteArrayOutputStream class.
  2. Initialize an instance of the Document class to load the OneNote Notebook.
  3. Write the intermediary file in PDF format using the save method.
  4. Load the intermediate file with the Document class.
  5. Export the OneNote .one Notebook as an Excel file.

The following sample code demonstrates how to convert a OneNote .one file to an Excel file in Java:

Get Free Temporary License

You may evaluate the APIs without any evaluation limitations by requesting a Free Temporary License.

Conclusion

In conclusion, you have learned how to convert a OneNote .one Notebook file to an Excel file programmatically in Java. This can be useful when you need to perform some numeric calculations on the data present in the Notebook. Furthermore, you may take a look at the documentation space to explore other features of the API. In case you need to discuss any queries or concerns, please write to us at forum.

See Also