Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

How to convert Excel XML to csv

(1) ShareShare
ReportReport
Posted on by 2

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>

 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Re: How to convert Excel XML to csv

    @happyjoo 

     

    The given XML in your post is not valid:

     

    82121-ex-01.png

     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, onxml or power bi dataset to csv 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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow