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 / Check specific column ...
Power Automate
Answered

Check specific column contents before writing to Excel

(0) ShareShare
ReportReport
Posted on by 23

Hi,

I am extracting a table from a PDF and writing it to an Excel sheet. I am writing 1 row at a time by looping through the table. I am using the following variable:

 

%ExtractedPDFTables[0].datatable[rowNumToWrite]%

 

I iterate rowNumToWrite until I have written all rows.

There are 8 columns in the row and I want to check if a specific column (for example column D) is empty or not. If empty, I do not want to write the row.

How can I specify in an IF group the column I want to test?

 

On a side note, is there any good documentation that lists all the "add ons" you can append to a variable? For the ExtractedPDFTable variable, I only found by searching far and wide that you can put .datatable and row# after it. When I check the variable in the PAD editor and drill down it only offers "count". 

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you have a specific column name or index, you can use

    • %DataTable[rowIndex][columnIndex]%, where columnIndex is either a numeric value entered directly, or a variable containing a numeric value
    • %DataTable[rowIndex][columnNameAsVariable]%, where columnNameAsVariable is a variable that contains a column name as a string 
    • %DataTable[rowIndex]['columnName']%, where columnName is a string entered directly that represents a column name. 

     

    So, in your case, if you wanted to check column D (which is the 4th column, so we need index 3, as indexes are 0-based), you would need to use %ExtractedPDFTables[0].datatable[rowNumToWrite][3]% in your condition.

     

    As for some reference on variable data type properties, there's an article covering all of them here: https://learn.microsoft.com/en-us/power-automate/desktop-flows/datatype-properties

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • StanM Profile Picture
    23 on at

    @Agnius once again, you have helped me! Thanks very much.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard