RPA3
(RPA3)
January 10, 2020, 8:47am
1
Good afternoon! I download files from the site, I need to check the files for format.
You can do this:
If the first docx, and the second excel - then download.
Then open excel first (names unknown in advance)
Download. If there is an Excel file - open
How to do it?
1 Like
Hi
For both scenarios it seems like we need to open Excel first right
In that case
Once after downloading and Saving to a folder
—use a assign activity like this
arr_filepath = Directory.GetFiles(“yourfolderpath”,”*.xlsx”)
Where arr_filepath is a variable of type array of string which will have only xlsx files in it
—now use a FOR EACH activity and pass the above array variable as input
—inside the loop use EXCEL APPLICATION SCOPE and mention the input file path as item.ToString
Cheers @RPA3
1 Like
RPA3
(RPA3)
January 10, 2020, 9:02am
3
An array is not needed. the file will be 1 with this format
1 Like
Then we can mention like
Str_filepath = Directory.GetFiles(“yourfolderpath”,”*.xlsx”)(0).ToString
Then pass it directly to excel application scope with input as str_filepath
Cheers @RPA3
Oh is my comment coming like this
@RPA3
In Directory.GetFiles(“yourfolderpath”,”*.xlsx”)(0)
Here yourfolderpath mean the folder path of where excel file is downloaded
And in excel application scope pass the input as str_filepath as now that is the variable which holds the excel file path right
Inside that scope we can use any excel activity we want
Cheers @RPA3
RPA3
(RPA3)
January 10, 2020, 9:41am
7
Palaniyappan:
Привет
Для обоих сценариев кажется, что нам нужно открыть Excel сначала справа.
В этом случае
Один раз после загрузки и сохранения в папке
используйте назначенное действие, подобное этому
arr_filepath = Directory.GetFiles (“yourfolderpath”, ”*. Xlsx”)
Где arr_filepath - это переменная типа array of string, в которой будут только файлы xlsx
теперь используем действие FOR EACH и передаем вышеуказанную переменную массива в качестве входных данных -
внутри цикла используем EXCEL APPLICATION SCOPE и упоминаем путь к входному файлу как item.ToString
What if the file was not downloaded and the folder already had other excel files, I don’t need to open the old ones