Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active August 15, 2022 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/1b76fa8f24ce654157be43db0655d3b8 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/1b76fa8f24ce654157be43db0655d3b8 to your computer and use it in GitHub Desktop.
Convert OneNote to Excel XLS XLSX in Java
// Initialize an instance of ByteArrayOutputStream class.
final ByteArrayOutputStream stream = new ByteArrayOutputStream();
// Load the OneNote .one file using Document class.
com.aspose.note.Document oneFile = new com.aspose.note.Document("Aspose.one");
// Export the .one file as PDF
oneFile.save(stream, com.aspose.note.SaveFormat.Pdf);
// Load the file using Aspose.PDF Document class.
com.aspose.pdf.Document file = new com.aspose.pdf.Document(stream.toByteArray());
// Convert the OneNote .one file as Excel file.
file.save("SaveOutput.xlsx" , com.aspose.pdf.SaveFormat.Excel);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment