매번 같은 은행사이트에서 은행거래내역을 매일매일 다운받고 있는 상황입니다.
다운받은 엑셀파일은 "거래내역조회"라는 단어를 매번 포함하면서 뒤에는 다운받은 날짜가 파일명으로 지정됩니다. 즉 매번 파일명이 거래내역조회라는 단어를 포함하긴하지만 달라지는 겁니다.
다운로드되는 경로는 항상 같은 곳이며 이를 다운받자마자 바로 실행시키는 RPA를 만들고있는 중입니다.
아래에 관련 이미지를 첨부합니다.
아래에 이미지와같이 했는데, 실행이되지 않습니다.
어떤게 문제일까요?
Anil_G
(Anil Gorthi)
June 13, 2023, 2:02am
2
@Jeongmin_Park
For file info activity you have to give the filepath…but you are trying to give the folder path
Please use this vararray = directory.Getfiles("Folderpathtodownloads","*FileName*")
This will give the filenames matching the given name as array of strings…if you want the latest file out of the whole then use
requiredfile = Vararray.OrderByDescending(function(x) file.GetCreationTime(x).ToString)(0)
This will give the latest file location as output
Or
Aternately
Use for each file in folder activity and give the folder path and use orderby creation date time
Then inside loop use currentfile.FullName to get the location of file and there are filters in the activity where you can give the required file name
And include a break to break after the first file automatically
Cheers
vararray = directory.Getfiles("Folderpathtodownloads","*FileName*")
requiredfile = Vararray.OrderByDescending(function(x) file.GetCreationTime(x).ToString)(0)
이걸 어디에 입력해야하니?
Anil_G
(Anil Gorthi)
June 13, 2023, 2:33am
4
@Jeongmin_Park
Vararray is a variable of type string array and requiredfile is of type string
And you can use them in assign activities…with left value as value before equals and right as value after equals
Cheers
Assign: Value cannot be null. (Parameter ‘source’)
이게 뜨는데 변수이름을 requiredfile 설정하고 내가 기본값을 넣지 않긴했는데 이렇게 하는게 맞아?
Anil_G
(Anil Gorthi)
June 13, 2023, 2:46am
6
@Jeongmin_Park
As per error looks like your vararray is empty…can you please check by running in debug mode…
Then you can see the variable values from locals panel
Cheers
무슨 말인지 잘 모르겠어…
좀 더 상세히 알려줄수 있을까? 내가 너무 초보라
Anil_G
(Anil Gorthi)
June 13, 2023, 4:22am
8
@Jeongmin_Park
Run the bot in debug mode…and tehn when error is theown…go to locals panel and check if the variables is having data
If not…in getfilee the first one is the folder pth and seconf is the filter for filename…so if filter is not retrieving any files then vararray will be empty
If its empty that menas no file is retrieved
Cheers
is it right…?
i’m so sorry. i’m beginner…
Anil_G
(Anil Gorthi)
June 13, 2023, 4:39am
10
@Jeongmin_Park
Thats correct…do the step into and then check
The variable…as of now you see string once you step into you shpuld see filenames
Cheers
하지만, 왜 실행이 되지않지?..
액티비티 순서가 저게 맞아?
Anil_G
(Anil Gorthi)
June 13, 2023, 4:45am
12
@Jeongmin_Park
You need not use get file
Info nor the if activity…use the assigns with given values
Cheers
나는 너 덕분에 엑셀파일을 실행하는데에 성공하였어.
근데 이제 이 실행한 엑셀파일을 편집하려하는데,
매번 달라지는 파일을 편집하는게 가능할까?
excel process scope 액티비티를 사용하면 매번 달라지는 엑셀파일들을 편집할수 있을까?
Anil_G
(Anil Gorthi)
June 13, 2023, 4:55am
14
@Jeongmin_Park
Yes as you have the file in variable…any new file will be edited or changed as per your requiremnet you setup…
Till the structure of excel does not change it would work on any new file
Cheers