Can Python read/write XML and Excel XLSX files?

Hi I’m new here. I’m a Perl programmer and need to eventually make a web app using the Microsoft Azure ecosystem. I’m new to MS Azure and Python. I’ve been doing tutorials about Azure Data Factory and I don’t see how the Data Factory will help me. There are MANY parts to the Azure ecosystem. Here is the basic flow of the multiple Azure programs I will be making.

  1. User goes to a specific URL, one for each specific program. For example, one URL will be to read business card XML files and spit out a XLSX and CSV file in the exact same format containing the information from all XML files. (The user needs the CSV file as input to another program I am not responsible for, but checking the data with the eyeball Mark 1 is easier in the XLSX file.)
  2. User drags 1 or more files to the web page and clicks a “Process” button. Control passes to a programming language to read the input files.
  3. The website (my program) loops through each row in the spreadsheet, extracts data from input files and returns 1-2 files in XLSX or CSV format containing information with specific columns in a specific order.
  4. There will be at least 2 different programs processing the input files, each different from the other.

I know very basic ideas about Azure App Service. For example, it can support different languages like Python, Java, Javascript and a few more.

I’m looking for the easiest solutions since I have to learn both the Azure environment and any programming language that will go with it, like Python.

My questions.

  1. Does Python support reading/writing XLSX files? I think this would have to be done by Python.
  2. Does Python support reading XML and getting info from specific fields/tags? I don’t want to read the XML manually if I don’t have to. “Keep it simple”.
  3. Will the App Service do what I want based on the requirements above?

Before I post in an Azure forum I’d like to get some answers here first. I did 15 minutes of a Python tutorial and it looks very similar to Perl.

Thank you for your time!

For xlsx see here.

For XML see xlml or lxml.


You can also use the pandas library if you are dealing with tabular data - it has good support for excel import and export, it is reasonably quick and flexible for handling bulk operations on columns of data and it can handle some simple custom xml formats IO tools (text, CSV, HDF5, …) — pandas 2.1.4 documentation

Regarding using the App Service, it will certainly work. I’ve had less frustration using Docker images over native Web Apps. Going further, you might want to check out Azure Functions or Azure Container Apps, which are even easier to set up.

1 Like

Thank you. That’s very helpful. I know very little about Azure Data Factory, and nothing about any other parts of Azure. The Azure ecosystem is absolutely huge.