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 / Error Excel file acces...
Power Automate
Answered

Error Excel file access writing formula

(0) ShareShare
ReportReport
Posted on by 566

I need to write this formula:

 

=COUNTA(UNIQUE(FILTER(A5:A1000000,A5:A1000000<>"")))

 

to an Excel file into Range "A3"

but a get this error message "Cannot access file......"

If write a simple Text instead of this formula i don't have this issue.

Could you help me please?

I have the same question (0)
  • CU31080729-3 Profile Picture
    502 Moderator on at

    Hi,

    I am trying to your formula in to my flow, but i am not get any kind of error as you mention

    please some screenshot of error and your flow its better to understand exact error

     

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

     

    Thanks & Regards

    Chetan Ninghot

     

  • Sormick Profile Picture
    566 on at

    Dear @Chetan_Ninghot 

    Sorry for my late reply.

    Please find here the screenshot of the error (Sorry, the error is in french)

    The translation of the error is: "Cannot write into Excel file"

    1.JPG

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Sormick 

     

    Have you tried assigning formula in clipboard and pasted in  excel cell?

     

    For quicker reference:

    Instead of ‘write to Excel’

     

    Set to clipboard text %Formula%
    Then activate the cell you want to paste in

    Then Paste cells to Excel

     

    Here is mine, and it worked.  Ignore the 'Replace Text', we use commas instead of semi-colons.

     

    Deenuji_0-1713255543484.png

     

     

    Please refer the below link - https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Is-it-possible-to-use-power-automate-desktop-to-paste-a-formula/td-p/1441404n

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • Sormick Profile Picture
    566 on at

    Dear @Deenuji 

    What do you mean with "Set to clipboard text %Formula%" ?

    I'm sorry i'm still a novice in power automate desktop.

    Could you please explain a little more how to convert clipboard text to formula?

  • Verified answer
    CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Sormick 

     

    Please follow the below approach:

    1. Launch Excel
    2. Set the variable ForumlaText to the formula =COUNTA(UNIQUE(FILTER(A5:A1000000,A5:A1000000<>""))).
    3. Set the clipboard text to the value of the variable ForumlaText.
    4. Activate cell H1 in the Excel instance.
    5. Paste the content from the clipboard into the activated cell in the Excel instance.

    Sample flow screenshot:

     

    Deenuji_0-1713267480164.png

    Source code:

     

    Excel.LaunchExcel.LaunchUnderExistingProcess Visible: True Instance=> ExcelInstance
    SET ForumlaText TO $'''=COUNTA(UNIQUE(FILTER(A5:A1000000,A5:A1000000<>\"\")))'''
    Clipboard.SetText Text: ForumlaText
    Excel.ActivateCellInExcel.ActivateCell Instance: ExcelInstance Column: $'''H''' Row: 1
    Excel.PasteCellsToExcel.Paste Instance: ExcelInstance

     

     

    How to copy/paste the above code into your power automate desktop?

    Deenuji_2-1713267784234.gif

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • Sormick Profile Picture
    566 on at

    Hi,

     

    Now i know what was going wrong with my formula.

    It should be translated to English formula instead of French formula on power Automate Desktop.

    Now it works!

    Thank you al for your support!

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