Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert TXT to XML in Python | Python Text to XML Converter
# This code example demonstrates how to convert TXT to XML.
import jpype
import asposecells
jpype.startJVM()
import asposecells.api as ac
# Load an existing TXT file
workbook = ac.Workbook("C:\\Files\\sample.txt")
# Save the file as XML
workbook.save("C:\\Files\\Output.xml")
jpype.shutdownJVM()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment