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 / execute sql from excel...
Power Automate
Unanswered

execute sql from excel, return empty cell

(0) ShareShare
ReportReport
Posted on by 100

execute sql from excel(发票清单.xlsx), return some empty cell for supplier column, the column cell format is 'general', some cell value is string, some is number, the cell with string return empty.

 

sql:

select * from [%SheetName%]
where Status is null

lion_2-1689824279672.png

column format in excel

lion_0-1689824217521.png

 

some cells are empty within supplier column but the data in excel has value

lion_1-1689824249589.png

 

 

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

    This is the normal behavior of running SQL queries to Excel. The data type that the SQL query determines for each column has nothing to do with the formatting of the column in Excel. It uses some of the first values to determine the data type. And if those values are numeric, it will assume the column is numeric and then ignore non-numeruc values.

    As far as I know, the only way to work around this is to modify the connection string to force it to read the entire contents of the table as text. It can be done by adding the IMEX=1 parameter to the extended properties of the connection string. See here for reference: https://www.connectionstrings.com/ace-oledb-12-0/treating-data-as-text/

    -------------------------------------------------------------------------

    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.

     

  • lion Profile Picture
    100 on at

    know it's a normal behavior, ask business format the column to 'Text' then issue fixed, thanks!

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard