阅读MS Excel XML文件到pandas dataframe?

时间:2013-07-24 11:06:55

标签: python xml excel pandas dataframe

我有一个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">

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

1 个答案:

答案 0 :(得分:1)

您是否尝试过Canopy python&#39; s pyxll,它被宣传为&#34; Python for Excel Solution&#34;

请查看它,看看它是否能解决您的问题。