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 / Converting the data fr...
Power Automate
Answered

Converting the data from an xlsx file into a Json format

(0) ShareShare
ReportReport
Posted on by 156

Hello Everyone,

I am trying to create a power automate flow that will upload a document into a website. The format that the website requires is a Json format and the data that i download from PowerBI into a onedrive folder is an xlsx file. I was able to get this done by using "select" action however, im having issues with the date/time. It only picks up the "Timestamp" values if its a text format, however excel automatically converts a cell to a date format whenever time is added. I keep getting errors that says cannot be converted to target type. Expressions i've used "formatDateTime(item()?['Timestamp'], 'yyyy-MM-dd HH:mm')", "formatDateTime(addDays('1899-12-30', int(item()?['Timestamp'])), 'yyyy-MM-dd HH:mm')" and "formatDateTime(item()?['Timestamp'], 'yyyy-MM-ddTHH:mm:ssZ')". I need help as i dont really know what to do from here.

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
    Can you share the outputs of the Filter Array action? This will help troubleshooting this issue.
     
    Additionally, can you also share the full expression. In the screenshot I can see you are using an if function in the expression as well. Would be good to see that part too to get the full picture of your setup.
  • JL82 Profile Picture
    156 on at
    Thank you. 
     
    The expressions ive tried using are below none of which works.
     
    formatDateTime(item()?['Timestamp'], 'yyyy-MM-dd HH:mm:ss')
     
    formatDateTime(item()?['Timestamp'], 'yyyy-MM-ddTHH:mm:ssZ')
     
    formatDateTime(addDays('1899-12-30', int(item()?['Timestamp'])), 'yyyy-MM-dd HH:mm')
     
    if(
       or(equals(float(item()?['Timestamp']), float(item()?['Timestamp'])), isInteger(item()?['Timestamp'])),
       formatDateTime(addDays('1899-12-30', int(item()?['Timestamp'])), 'yyyy-MM-dd HH:mm:ss'),
       formatDateTime(item()?['Timestamp'], 'yyyy-MM-dd HH:mm:ss')
    )
     
    This below is the source file that im trying to test. 
     
     
    This is the output of the filter array
     
  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
    I see the Timestamps values are formatted as a number, which is not ISO 8601 format.
     
    Are you using the ISO 8601 format in your list rows present in a table action? If not, can you set that option (like in the screenshot below) and try again?
     
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    formatDateTime(addDays('1899-12-30', int(item()?['Timestamp'])), 'yyyy-MM-dd HH:mm').
    formatDateTime(item()?['Timestamp'], 'yyyy-MM-dd HH:mm')
     
     
    formatDateTime(addDays('1899-12-30', int(item()?['Timestamp'])), 'yyyy-MM-ddTHH:mm:ssZ')
     

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard