Having trouble running an Excel script. Flow says it did, but it really didn't.

Options

Hi Alex, I know this isn't directly RE related, but I'm trying to develop a flow that writes to an Excel file. I need to run an Excel script that moves the most recently created worksheet to the first position, so I can write to it. In Excel, the script works just fine and does what it's supposed to. In my flow, I don't get any errors, but it's not actually running the script. I tried setting up a second flow, just to run the script, and it's not working either. Any ideas?

Comments

  • Alex Wong
    Alex Wong ✭✭✭✭✭
    Ninth Anniversary Facilitator 4 Name Dropper Photogenic

    @Susan Walters
    I used to use Excel Script a lot in PA when I was combining excel csv data from SFTP download into one report. They run without issue. I don't SFTP anymore (Query API replaced that), but do still use excel script for “formatting”. I have a “commonformat” script that format the excel as table and “proper” auto-width the table, and they are running without issue also. That said, what I mean to say is running excel script from PA is working, not a system-wide MS issue. That is always important to make sure first.

    df5aa864c2e29679bd99c3dfcf3a1af4-huge-im
    7337ffbb70ca2136ce48c4be35841fa4-huge-im

    So to diagnose this, you will first have to determine if your script got “called” or not. You can use “console.log()” to return a log message to the calling PA flow. You can add this as the first line of script and subsequently other places after some operation is done.

    Here's a good article on troubleshooting excel script

    https://learn.microsoft.com/en-us/office/dev/scripts/testing/troubleshooting

    You can also paste here your script and I can help take a look

Categories