Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
toopnad
- Junior Coder
- Posts: 34
- Joined: Mon Apr 12, 2021 10:10 am
- Location: Russian Totalitarian Republic, Perm city
Post
by toopnad » Mon Aug 02, 2021 6:42 am
Code: Select all
Let>GFL_TYPE=0
Let>GFL_SORTTYPE=1
IfFileExists>Z:\Обмен\ЗАЯВКИ\ЗАЯВКИ в поставку\ОТЕЧ\2021\*.*
GetFileList>Z:\Обмен\ЗАЯВКИ\ЗАЯВКИ в поставку\ОТЕЧ\2021\*.*,files,;
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%
Let>k=0
Repeat>k
Let>k=k+1
Executefile>file_names_%k%
//Message>file_names_%k%
//wait>15
WaitWindowOpen>* - Excel
Until>k,file_names_count
How to get the file name into a variable without path and extension to substitute in waitWindowOpen instead of *?
-
toopnad
- Junior Coder
- Posts: 34
- Joined: Mon Apr 12, 2021 10:10 am
- Location: Russian Totalitarian Republic, Perm city
Post
by toopnad » Mon Aug 02, 2021 7:16 am
Code: Select all
ExtractFileName>file_names_%k%,oldfilename,0
StringReplace>oldfilename,.xlsb,,strNewString
WaitWindowOpen>%strNewString% - Excel
I think I did it
-
Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Mon Aug 02, 2021 8:42 am
Code: Select all
ExtractFileName>file_names_%k%,oldfilename,1
-
toopnad
- Junior Coder
- Posts: 34
- Joined: Mon Apr 12, 2021 10:10 am
- Location: Russian Totalitarian Republic, Perm city
Post
by toopnad » Mon Aug 02, 2021 9:00 am
This will shorten the code thanks! May I ask offtopic? If I want to open an Excel file with a password, is it only through VBA? Are there any other options?
-
Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Mon Aug 02, 2021 4:47 pm
Yes I believe the best way is to use VBA.
-
toopnad
- Junior Coder
- Posts: 34
- Joined: Mon Apr 12, 2021 10:10 am
- Location: Russian Totalitarian Republic, Perm city
Post
by toopnad » Mon Aug 02, 2021 5:00 pm
Thank you, I did so, the topic is closed.
-
JRL
- Automation Wizard
- Posts: 3524
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Mon Aug 02, 2021 6:00 pm
Adding the password at the end of XLOpen> works for me.
-
toopnad
- Junior Coder
- Posts: 34
- Joined: Mon Apr 12, 2021 10:10 am
- Location: Russian Totalitarian Republic, Perm city
Post
by toopnad » Tue Aug 03, 2021 3:10 am
Great news! I'll try)