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 :
Power Automate - Building Flows
Answered

Create CSV with sub columns

(0) ShareShare
ReportReport
Posted on by 1,118

Dear Team,

 

is that possible to create a CSV in the below format. I am just wondering how I populate CSV with sub columns? kindly assist.

 

Sl No Tag no 01-May-22 02-May-22 03-May-22 04-May-22 05-May-22
M E M E M E M E M E
1 963788 5.6 5.5 5.2 5 5 5        
2 963367 3.4 3.2 2.8 3 2.5 3        
3 963722 7.00 6.1 5.8 5 5.8 5        
4 963266 6 6 5 5 5.8 5        
5 963696 4 3.2 3.6 4 3.5 4        
6 963777 5 4.2 4.5 4 4 5        
7 963185 5 5.2 5.1 5 4.8 5        
8 963128 5 5.2 4.8 5 4.7 6        
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at
    Re: Create CSV with sub columns

    Hi @venka91 

     

    A csv is just comma separation between fields, a text file.  How would you want the first two rows to be formatted in CSV?

     

    Sl No,Tag no,01-May-22,02-May-22,03-May-22,04-May-22,05-May-22 

    ,,M,E,M,E,M,E,M,E,M,E

     

    OR

     

    ,,01-May-22,02-May-22,03-May-22,04-May-22,05-May-22 

    Sl No,Tag no,M,E,M,E,M,E,M,E,M,E

     

    You just need to remove the original header and append the chosen header to the CSV Output

     

    DamoBird365_0-1672396409632.png

    Here is the output:

     

    DamoBird365_1-1672396460066.png

     

    I started with option 1, option 2 option 3 as the header but ended up with two new headers, including a sub header.


    Cheers
    Damien

    Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks

  • venka91 Profile Picture
    1,118 on at
    Re: Create CSV with sub columns

    hi,

     

    thanks for taking your time to reply. I wanted to have headers like option 2

     

    ,01-May-22,02-May-22,03-May-22,04-May-22,05-May-22 

    Sl No,Tag no,M,E,M,E,M,E,M,E,M,E

     

    Dates must be on header 1

    Sl No, TagNo, M E must be on header two.

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at
    Re: Create CSV with sub columns

    @venka91 

     

    So if your data is already formatted to include a header:

    Sl No,Tag no,M,E,M,E,M,E,M,E,M,E

     

    All you need to do is construct a new header ,01-May-22,02-May-22,03-May-22,04-May-22,05-May-22 and append the CSV output to the new header.  This can easily be done in a compose as seen in my screenshot.

     

    Damien

  • venka91 Profile Picture
    1,118 on at
    Re: Create CSV with sub columns

    hey thanks. you are guidance giving me new hopes.

    i am trying to write my flow as below.

     

    venka91_0-1672405631568.pngvenka91_1-1672405683751.pngvenka91_2-1672405893547.png

    i am trying to read the dates from sharepoint list 

    since the date column is single line text in my sharepoint, this is read as string.

    so i am trying to build a string array using split, and trying to get unique values

     

    and again making them string by using Join ...

     

    but i am unable to create a string array.

    venka91_3-1672406397802.png

     

  • Verified answer
    venka91 Profile Picture
    1,118 on at
    Re: Create CSV with sub columns

    Received a solution from the below link

    creating a csv or html table from convert to HTML based on unique dates as header

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 797 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
developerAJ Profile Picture

developerAJ 319

Last 30 days Overall leaderboard