I tried this , but it seems not working with Excel XML format. I can use PowerShell to do the job. But how can I do it with Power Automate? Is it even possible? Thanks.
FYI, the beginning of the format is like
<html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><meta http-equiv="Content-type" content="text/html;charset=UTF-8" /></head><style><!--
body,table{font-size:14px;}
table{border-collapse:collapse;}
th{padding:2px;border:1px solid #000;white-space:nowrap;background-color:#F2FAFF;}
td{padding:2px;border:1px solid #000;white-space:nowrap;}
--></style><body><table border="1" cellspacing="0" cellpadding="0"><tbody><tr><th style="background-color:#F2FAFF;white-space:nowrap;" >xx/position</th><th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-19</th><th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-20</th><th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-21</th><th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-22</th><th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-23</th><th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-24</th><th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-25</th></tr><tr><td >aaa</td><td >9</td><td >12</td><td >4</td><td >8</td><td >4</td><td >10</td><td >7</td></tr><tr><td >xxxx</td><td >7</td><td >12</td><td >11</td><td >13</td><td >13</td>
The given XML in your post is not valid:
I changed it to this and it works:
<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
</head>
<style>
<!--
body,table{font-size:14px;}
table{border-collapse:collapse;}
th{padding:2px;border:1px solid #000;white-space:nowrap;background-color:#F2FAFF;}
td{padding:2px;border:1px solid #000;white-space:nowrap;}
-->
</style>
<body>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th style="background-color:#F2FAFF;white-space:nowrap;" >xx/position</th>
<th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-19</th>
<th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-20</th>
<th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-21</th>
<th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-22</th>
<th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-23</th>
<th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-24</th>
<th style="background-color:#F2FAFF;white-space:nowrap;" >2021-07-25</th>
</tr>
<tr>
<td >aaa</td>
<td >9</td>
<td >12</td>
<td >4</td>
<td >8</td>
<td >4</td>
<td >10</td>
<td >7</td>
</tr>
<tr>
<td >xxxx</td>
<td >7</td>
<td >12</td>
<td >11</td>
<td >13</td>
<td >13</td>
</tr>
</tbody>
</table>
</body>
</html>
You can then try to use guidelines from post you were looking at, on
Besides those in the post you can also use xpath expression query to query the XML nodes directly and get a list of nodes that way that you can use to build the CSV out of the XML.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional