web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate adds un...
Power Automate
Unanswered

Power Automate adds unwanted XML data to Excel

(1) ShareShare
ReportReport
Posted on by 32

Hi all !

 

I've an issue with a flow that is working, BUT the output file isn't convenient. 

 

My flow is pretty simple:

  • When I receive a specific email (sender, subject,...),
  • I delete an existing file in a sharepoint,
  • I get email attachment - which is an Excel file,
  • Then I create a new file in the same sharepoint location.

It's a simple "Replace" flow, with deleting and creating.

 

My problem is that the created Excel file owns XML data (that I can identify using the Excel - File - Info - Inspect Document function).

These XML data makes the daily automated refreshes of a PowerBI report fail.

 

Since the Excel file opened directly from the email attachment doesn't have XML data, I suspect that they're added by the Power Automate flow.

 

Does someone have an idea about how can I prevent these XML data to be added?

Or perhaps to remove them at the end of my flow?

 

Thank you in advance for your help !

 

Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    What type of Excel file is this?  (Power BI prefers .xlsx).  Could you potentially post a before and after file demonstrating the issue?

  • LT3 Profile Picture
    14 on at

    I'm having this exact same issue.

    Files are in .xlsx format before and after the Power Automate process, but when I inspect after the Power Automate has occured they contain custom XML Data which is causing errors with Power BI service.

    Was working fine previously.

  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    I know that PowerApps are injecting hidden (and unwanted) index columns but I didn't think Power Automate would do the same?

  • Bubulover Profile Picture
    32 on at

    Both files are in .xlsx

     

    Do you know how can I post file?

     

    If PowerAutomate mandatory adds XML data to .xlsx files added in a sharepoint, is there any trick that might prevent it?

  • LT3 Profile Picture
    14 on at

    Can I ask if you have a custom name in the File Name part of the Create File action in Power Automate?

     

    Mine works ok as long as I don't change this File Name field from 'Name' (attachments name) to any custom expression or text!?

  • Bubulover Profile Picture
    32 on at

    Yes I do change the file name at the Create File action.

    I'll change the action to use the original file name, try again, and I'll let you know.

  • Bubulover Profile Picture
    32 on at

    I indeed changed the file name at the Create File action of Power Automate.

     

    I've changed the flow that now keeps the original file name at this action.

    But I'm still having the issue at the PowerBI refresh.

     

    Any other idea ?

     

    Bubulover_3-1665132500861.png

    Bubulover_4-1665132530826.png

     

     

  • LT3 Profile Picture
    14 on at

    Sorry, probably not much help, but I ended up changing my source file from .xlsx to .csv format and then the process worked as it should.

     

    Not sure if that's an option for you.

  • Verified answer
    Bubulover Profile Picture
    32 on at

    Hello,

     

    The file is actually sent by an outside compagnie that isn't willing to change it.

     

    My understanding is that to convert an .xlsx to .csv, Power Automate needs that the .xlsx owns a Table with a specific name, which the file doesn't have.

     

    So, I follow the below video to manually add Table in this file, then I could use the 2nd video to convert the .xlsx to a .csv

     

    And yes, you're right, .csv doesn't carry the XML data that PowerAutomate adds and for now my problem is solved!

     

    Create Table in .xlsx with Power Automate:

    Create Table in Excel WorkSheet - DamoBird365

     

    Convert .xlsx to .csv:

    Microsoft Power Automate: How to convert Excel (.xlsx) to .csv files - Full Tutorial - Bing video

  • LT3 Profile Picture
    14 on at

    Just here to say thanks for linking those, just adding the script part to create a table within the worksheet worked for me. I had another issue with my flow because the csv files ended up being too large to email!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard