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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Skip data on Excel col...
Power Automate
Answered

Skip data on Excel column from Power Automate desktop flow

(0) ShareShare
ReportReport
Posted on by 50

I have Excel data on same column from 2 different dates like below:

AdyG_0-1719412433231.png

 

However to read the data, I have to ignore only the value that says "2-Jun". So in all, I need to read the 6 rows.

It could be any date, so I can't make it to filter out just "2-Jun".

Also I can't get rid of this date. It has to be there on the original file, after I do the manipulations based on the 6 rows.

 

Things I tried but were not successful:

1. Reading the Excel data using SQL queries, couldn't get rid of this cell temporarily.

2. Set a list variable to have all dates from 1st to 31st and put for each loop to read the number.

 

AdyG_1-1719413253485.png

 

Please guide me on how I can do this.

Thanks.

I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Hi @AdyG 

    Will the date be same format????

    If so 

    Fst read the excel using launch excel and read Excel sheet then use find and replace datatable activity then give regular expression from for the date formats 

    Then you can delete the date value from the index you get from find and replace activity and you can write it into new sheet or new excel sheet.

     

    Hope this helps,

    Usha 

     

  • NathanAlvares24 Profile Picture
    1,714 Moderator on at

    Hi @AdyG !

     

    Follow this flow.

    NathanAlvares24_1-1719422092579.png

     

    My excel file what it looks like:

    NathanAlvares24_1-1719419079466.png

     

    Configuration of some actions:

    NathanAlvares24_2-1719419218112.png

    NathanAlvares24_3-1719419230830.png

    NathanAlvares24_4-1719419247541.png

     

     

     

    The regex used in action 3:

     

     

     

    ^\d{1,2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*$

     

     

     

     

    Code (just copy and paste into your flow):

     

     

     

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Users\\UserName\\Desktop\\Book1.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> Column_Data
    Variables.FindOrReplaceInDataTable.ReplaceItemInDataTableWithRegexEverywhere DataTable: Column_Data AllMatches: True ValueToFind: $'''^\\d{1,2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*$''' TextToReplaceWith: $'''%''%''' DataTableMatches=> DataTableMatches
    LOOP LoopIndex FROM 0 TO Column_Data.RowsCount - 1 STEP 1
     SET varColumn_Data TO Column_Data[LoopIndex][0]
     IF IsEmpty(varColumn_Data) THEN
     Variables.DeleteRowFromDataTable DataTable: Column_Data RowIndex: LoopIndex
     END
    END
    Excel.CloseExcel.Close Instance: ExcelInstance

     

     

    Output:-

    Before (when reading data):

    NathanAlvares24_0-1719421949680.png

     

    After(1. replace dates using the regex and then 2. delete the empty rows obtain a filtered data table):

    1.

    NathanAlvares24_3-1719422244185.png

     

    2.

    NathanAlvares24_2-1719422131992.png

     

    I hope this helps.

  • Verified answer
    CU16071609-1 Profile Picture
    6,255 Moderator on at

    @AdyG 

     

    You can follow the below approach:

     

    Deenuji_1-1719420628143.png

     

    Code:

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Boot\\Q.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: False RangeValue=> Column_Data
    SET Counter TO 0
    LOOP FOREACH CurrentItem IN Column_Data
     Text.ParseText.RegexParseForFirstOccurrence Text: CurrentItem[0] TextToFind: $'''\\b\\d{1,2}-[A-Za-z]{3}\\b''' StartingPosition: 0 IgnoreCase: False OccurrencePosition=> Position Match=> Match
     IF Position = 0 THEN
     Display.ShowMessageDialog.ShowMessage Title: $'''Info''' Message: $'''Its date value: %Match%''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
     Variables.DeleteRowFromDataTable DataTable: Column_Data RowIndex: Counter
     SET Counter TO Counter - 1
     ELSE
     Display.ShowMessageDialog.ShowMessage Title: $'''Info''' Message: $'''Not matched with Date format: %CurrentItem[0]%''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
     END
     SET Counter TO Counter + 1
    END

     

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • AdyG Profile Picture
    50 on at

    Thank you so much everyone!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 247 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 164 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 138 Super User 2026 Season 2

Last 30 days Overall leaderboard