gpt4 book ai didi

excel - 从 xml 文件中提取数据到 Excel 或 txt 文件

转载 作者:行者123 更新时间:2023-12-04 22:29:45 25 4
gpt4 key购买 nike

我想弄清楚如何从 xml 中的记录中提取数据,并将该信息放入 excel 或仅以适当分隔的文本文件中,以便我可以轻松地复制它。下面是一个记录示例,我只想从 ITEM_NO、DESCRIPTION、CATEGORY、CLASSIFICATION、LIST_RATE 中获取信息。

 <Record>
<ITEM_NO> 049000045734</ITEM_NO>
<ITEM_MANU>0</ITEM_MANU>
<LOCATION>2</LOCATION>
<DESCRIPTION>Powerade Lemon 32 Oz</DESCRIPTION>
<CATEGORY>ED</CATEGORY>
<CLASSIFICATION>Non-Alcoholic Drink</CLASSIFICATION>
<SUB_CATEGORY></SUB_CATEGORY>
<PLACEMENT>1</PLACEMENT>
<DEPARTMENT>0</DEPARTMENT>
<REV_ACCT>200</REV_ACCT>
<ISSU_UNT_CST>0</ISSU_UNT_CST>
<ISSU_UNT_MEA>EA</ISSU_UNT_MEA>
<PRICING>
<LIST_TYPE>F</LIST_TYPE>
<LIST_RATE>3.5</LIST_RATE>
<LIST_TOGO>0</LIST_TOGO>
<LIST_TOGOA>0</LIST_TOGOA>
<LIST_ROOM>0</LIST_ROOM>
<LIST_ROOMA>0</LIST_ROOMA>
<LIST_BAR>0</LIST_BAR>
<LIST_BARA>0</LIST_BARA>
<LIST_CHILD>0</LIST_CHILD>
<LIST_TEENS>0</LIST_TEENS>
<LIST_SENIOR>0</LIST_SENIOR>
<TAXES>
<TAXRATE1>0</TAXRATE1>
<TAXRATE2>0</TAXRATE2>
<TAXRATE3>0</TAXRATE3>
<PUR_UNT_MEA>EA</PUR_UNT_MEA>
<PUR_UNT_CST>0</PUR_UNT_CST>
<CNV_UM>1</CNV_UM>
<REORDER_PT>0</REORDER_PT>
<REORDER_QTY>0</REORDER_QTY>
<STD_COST>0</STD_COST>
<LEAD_TIME>0</LEAD_TIME>
<QTY_ONHAND>-14</QTY_ONHAND>
<QTY_ONORDER>0</QTY_ONORDER>
<QTY_INSTOCK>0</QTY_INSTOCK>
<LAST_SALE_DT>79636</LAST_SALE_DT>
<ITEMSTATUS>A</ITEMSTATUS>
<DISPLAYICON></DISPLAYICON>
<TIMESSELECTED></TIMESSELECTED>
<OVERRIDEGROUP1>0</OVERRIDEGROUP1>
<OVERRIDEGROUP2>0</OVERRIDEGROUP2>
<OVERRIDEGROUP3>0</OVERRIDEGROUP3>
<OVERRIDEGROUP4>0</OVERRIDEGROUP4>
<OVERRIDEGROUP5>0</OVERRIDEGROUP5>
<OVERRIDEGROUP6>0</OVERRIDEGROUP6>
<OVERRIDEGROUP7>0</OVERRIDEGROUP7>
<OVERAMTGROUP1>0</OVERAMTGROUP1>
<OVERAMTGROUP2>0</OVERAMTGROUP2>
<OVERAMTGROUP3>0</OVERAMTGROUP3>
<OVERAMTGROUP4>0</OVERAMTGROUP4>
<OVERAMTGROUP5>0</OVERAMTGROUP5>
<OVERAMTGROUP6>0</OVERAMTGROUP6>
<OVERAMTGROUP7>0</OVERAMTGROUP7>
<ORIDEPRINTER>0</ORIDEPRINTER>
<EIGHTYSIX>0</EIGHTYSIX>
<COUNTDOWN>0</COUNTDOWN>
<ADDTIPLINE>0</ADDTIPLINE>
<EXT_DESC></EXT_DESC>
</TAXES>
</PRICING>
</Record>

最佳答案

如果您有访问程序,您可以从外部数据导入中导入 xml 文件并将其导出为 Excel 文件或文本文件。

访问导入 xml
enter image description here

导出 Excel

enter image description here

关于excel - 从 xml 文件中提取数据到 Excel 或 txt 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54218206/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com