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

Community site session details

Session Id : 0cg41LtR8eUKHiVE3KB2x2
Power Automate - Building Flows
Unanswered

Sharepoint to Excel - messed up headers

Like (0) ShareShare
ReportReport
Posted on 13 Jul 2018 03:54:07 by 6

Hi all, 

 

I am trying to export a Sharepoint list once in a while as a excel file. here is the overview of the flow:

 

 

First problem I was having was solved after I figured out Flow only wants to produce cvs and not xlsx or xlsm files.

 

Second problem I am not being able to solve are headers. Ideally I want to pick column I export because otherwise I get a lot of columns not even visible in my list view. 

 

When I use Select operator the flow fails because it doesnt recognize column header names. 

 

 

If I remove Select operator completely file gets produced by column headers end up with these names above: h6yd, kcyo...

It must be some relating to sharepoint list header having one or more spaces.

 

Is it possible to perform a select operator and use only needed columns for CSV output and somehow have the output use the names for column headers like they are stated in the Sharepoint list?

 

Thank you!

I have the same question (0)
  • VLD Profile Picture
    6 on 19 Jul 2018 at 00:47:30
    Re: Sharepoint to Excel - messed up headers

    Hi mate, 

    thank you so much for your answer. 

     

    I tested it and it doesnt work. 

     

    When I try it I dont get the dynamic content to put in the expression formula. I only get option of vlaue and list of items ( entire output of the get items action/step ).

     

     
    1.png
     

    But when i try manually typing in an object I want to use ( see below ), then I get error - wrong expression:

    if(empty(item()?['Recommend_O365']),null,item()?['Recommend_O365'])

     

    So basically i want to have an expression that will replace object Recommend_O365 with a value I chose ( null, nil, NA, *, blank, etc. ) in case that this particular object comes out empty in the sharepoint list. I want to do that for all objects that might come out with empty field. 

     

    Though to be honest I find it odd. Export to csv should be pullink blank fields and just leave them blank. 

     

    Thank you so much for any assistance. 

  • v-yuazh-msft Profile Picture
    on 14 Jul 2018 at 06:01:55
    Re: Sharepoint to Excel - messed up headers

    Hi @VLD,

     

    You could add a if() expression to the column with might have empty values.

     

    I have made a tes on my side to create a sharpoint list as below:

    Capture.PNG

    The status column of an item is empty in the list.

     

    And I have created a flow as below:

    Capture.PNG

     

    The expression of status column as below:

    if(empty(item()?['status']),null,item()?['status'])

    The flow would run successfully as below:

    Capture.PNG

     

    Please take a try on your side and let me know if your problem could be solved.

     

     

    Best regards,

    Alice

     

     

     

     

     

     

  • VLD Profile Picture
    6 on 13 Jul 2018 at 10:49:27
    Re: Sharepoint to Excel - messed up headers

    Through a lot of trial and error I found out that the problem is not with the spaces in the column titles, but select data operator fails when there is blank field in the data. 

     

    Since the sharepoint list will house survey results with a lot of questions, many of which are optional, there will be a lot of blank entries. 

     

    Is there any way to counter this or replace blank with null or empty space or fix this in some other way?

     

    Thank you, 

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 626 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 374 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 284 Most Valuable Professional

Last 30 days Overall leaderboard
Loading complete