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 Automate
Unanswered

Datatable to excel

(0) ShareShare
ReportReport
Posted on by 4

Hi,

I have a datatable (5619 rows), but when i copy into excel, the columns with numbers are stored as Text.

How can i fix them?

I have the same question (0)
  • VishnuReddy1997 Profile Picture
    2,666 Super User 2026 Season 1 on at

    Hi @Gabojm ,

     

    After writing the Data into the excel ,Please use VBscript action to convert text to number as shwon in below image. Make necesarry changes in Code.

    VishnuReddy1997_0-1715739627787.png

     

    VBCode:

     

     

    Dim xlApp, xlBook
    
    ' Create Excel Application object
    Set xlApp = CreateObject("Excel.Application")
    
    ' Make Excel visible (for debugging)
    xlApp.Visible = True
    
    ' Open the Excel file
    Set xlBook = xlApp.Workbooks.Open("C:\Users\rv60612\Desktop\Text_To_Number.xlsx")
    
    ' Convert values in column A to number format
    xlBook.Sheets(1).Columns("A").NumberFormat = "0.00"
    
    ' Save and close the Excel file
    xlBook.Save
    xlBook.Close
    
    ' Quit Excel application
    xlApp.Quit
    
    ' Release the objects
    Set xlBook = Nothing
    Set xlApp = Nothing

    If you using that Cell data which on text as Number you simply use Convert Text to Number action.

    VishnuReddy1997_1-1715739800814.png

     

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

     

     

  • Gabojm Profile Picture
    4 on at

    I have this problem when i use "Run VBScript" after writing in Excel. How can i fix it?

    Captura de pantalla 2024-05-16 170752.png
  • Gabojm Profile Picture
    4 on at

    I have DLP when i use Run VBScript after writng an excel. How can i fix them?

  • VishnuReddy1997 Profile Picture
    2,666 Super User 2026 Season 1 on at

    Hi @Gabojm ,

     

    As per my understanding, Please check your DLP policies. You can do this by going to the Power Automate Admin pane. If necessary, you may need to talk to your admins about changing the existing DLP policy to allow use of the connectors you are using or adding you to a different environment with a DLP custom policy that will fit your needs.


    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Vishnu Reddy

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 269 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 184 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard