阅读MS Excel XML文件到pandas dataframe?

Lam*_*829 6 python xml excel dataframe pandas

我有一个MS Excel XML(2003)文件,其中包含以下元数据:

<?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">
Run Code Online (Sandbox Code Playgroud)

我想把它读成熊猫数据帧.这样做的好方法是什么?谢谢.

dgg*_*g32 1

您是否尝试过 Canopy python 的pyxll,它被宣传为“Python for Excel Solution”

请检查一下,看看是否能解决您的问题。