简体   繁体   中英

Read MS Excel XML file to pandas dataframe?

I have an MS Excel XML (2003) file with the following metadata:

<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?><Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" 
xmlns:x="urn:schemas-microsoft-com:office:excel" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">

I'd like to read it into a pandas dataframe. What's a good way to go about doing this? Thanks.

Did you try Canopy python's pyxll , it is advertised as "Python for Excel Solution"

Check it out please and see if it solves your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM