web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : diwjOSptmu8adXsFXU3GJv
Power Automate - Building Flows
Answered

PAD Syntax Error / Powershell-Script using "%"

Like (0) ShareShare
ReportReport
Posted on 7 Nov 2021 16:57:46 by

Hello Community,

 

while running a Powershell Script from the Shell without any Errors, I get "Syntax Error" from PAD using the same Script.

 

The Script formats an Excel-Report and I need to set NumberFormatting in some Columns to "percentage".

I understand that this is somehow related to "https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Power-Automate-Desktop-Unable-to-Render-URL-Syntax-error-invalid/td-p/850469", but for my purposes I require to pass this Line in my Script for Excel to understand the formatting:

 

$WorkSheet.columns.Item("B:D").NumberFormat = "0%"

 

But here's where PAD's confuses my command with its internal variables because of "%" and throws the Syntax-Error.

 

I would highly appreciate any help. Thanks!

  • v-qiaqi@microsoft.com Profile Picture
    on 09 Nov 2021 at 06:04:09
    Re: PAD Syntax Error / Powershell-Script using "%"

    Hi @Tylor,

    Could you please check the solution from @Zave to see if this could work on your side?

    Thanks for your cooperation.

  • Verified answer
    Zave Profile Picture
    88 on 07 Nov 2021 at 18:32:54
    Re: PAD Syntax Error / Powershell-Script using "%"

    Hi,

    You probably need to escape the "%" character. Try "%%" instead.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2