Trimming off an extension from text

Hello Team,

I need some help I am accessing a excel file that I am storing in a variable as you can see below.

image

But the challenge am having in the variable I store a name which comes with the extension(.xlsx)

Which I don’t need in the when using the Use App Activity selector.
As you can see in the screenshot below.
image

So how I trim off the xlsx extension from the name .

Kindly advise.

Best Regards,
Kakooza Allan Klaus

excelFileName = Path.GetFileNameWithoutExtension(YourExcelFilePathOrName)

grafik

2 Likes

Hi @ppr,

Kindly advise on how I can use the trimEnd

we would not recommend to do it with trimend

What about the replace

Just do one thing. From screenshot above you can see that we can use the immediate panel while debugging (set a breakpoint and get paused) for exploring statements. So you can test and check the different statements that you have in your mind.

For the question we gave the recommendation to use Path.GetFileNameWithoutExtension method

1 Like

Thank you bro

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.