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 / How to write datatable...
Power Automate
Unanswered

How to write datatable in excel using power automate desktop while preventing large numbers to be converted to an exponent?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am having an issue when writing a data table to power automate desktop, the issue occurs when a cell has a large number, since it converts the data to exponent. Below is how I am writing the data table to excel.

flowflow

The data table as it appears on PAD before pasting it in excel.

 

Data tableData table

This is how the data appears in excel

 

ExcelExcel

How do I prevent PAD from reformatting the data before pasting as now its distorting a reference which is creating an issue in referencing.

I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Anonymous 

     

    I tried below flow 

     

    Nived_Nambiar_0-1681815498509.png

     

    I used a vbscript to change the format of column, in my case column is at location A. 

    vbsript used :

     

     

    'Create an Excel application object
    Set objExcel = CreateObject("Excel.Application")
    
    'Open the workbook
    Set objWorkbook = objExcel.Workbooks.Open("%FilePath%")
    
    'Select the worksheet
    Set objWorksheet = objWorkbook.Worksheets("Sheet1")
    'Select the column you want to format and set the format to number
    objWorksheet.Range("A:A").NumberFormat = "0"
    'Save and close the workbook
    objWorkbook.Save
    objWorkbook.Close False
    objExcel.Quit
    
    'Release the object variables
    Set objColumn = Nothing
    Set objWorksheet = Nothing
    Set objWorkbook = Nothing
    Set objExcel = Nothing

    Here i have used A:A means first column (based on column letter) After writing the data, i have used resized rows or column action to resize like below

     

    Nived_Nambiar_1-1681815791505.png

     

    Hope this helps 

    Mark it as solution if it resolves your query 🙂

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Nived_Nambiar 
    I am launching a black excel document so using %FilePath% will not work for my case, is there a way to write a vb script for a blank document.

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Anonymous 

     

    Then use vbscript at last step of the process, after close excel action.

     

    Hope that would helps 🙂

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Nived_Nambiar 

    Tried that, the problem is that the value already changed, so the Reference is invalid. i.e. for the data above, when I convert to text at the end from the exponent, data is as below;

    mulikevs_0-1681827042304.png


    30932101251012510 is converted to 30932101251012500.

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Anonymous 

     

    After some tryouts, i was able to figure out why excel is writing 30932101251012510 as 30932101251012500, the reason is excel can have maximum 15 significant digits while for 30932101251012510 has significant digit >15 so it converts to nearest number of lesser significant digits.

     

    To resolve this, i have tried this way.

    Nived_Nambiar_0-1681874704990.png

     

    in write cell, along with number, i have specified apostophe at starting like below

    Nived_Nambiar_1-1681874762286.png

     

    So excel writes the data like this

    Nived_Nambiar_2-1681874802595.png

     

    Even reading the data from excel using PAD, it will read as 30932101251012510

     

    Hope this helps 🙂

     

    Mark it as solution if it resolves your query 🙂

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Nived_Nambiar 

    Thanks for the much needed assistance, the solution was formatting an excel file column as text before pasting data to it, so created a file with formatted columns then pasted the datatable and save it with a different file name so that the formatted file remains as an input.

  • Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at

    Hi @Anonymous ,

     

    Better you can use template file make the column format as a TEXT FORMAT.

    Once done Launch template excel and save that into output folder.

     

    Regards

    Ahammad Riyaz

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

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 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard