Above is the sample list of files …
1)i need to open it and spilt the cell value based on the comma and save it back.
2)After that need to mail using outlook
lets take like you have the above mentioned files in a folder
so to get those files in that folder of xlsx type alone we can get using this in an assign activity
out_file_path_array = Directory.Getfiles(“yourfolderpath”,"*.xlsx)
where out_file_path_array is of type array of string
Then using a for each loop by passing the above variable as input and type argument of for each loop should be of type string
inside the for each loop use a excel application scope with input as item from for each loop
inside the excel application scope use a read range activity with input of sheetname and output of type datatable named out_dt
with that next you can use a for each row loop all still being inside the very first for each loop, where in the for each row loop pass this out_dt as input and you can get the value of each cell in each row of a column using a assign activity like this
out_cell_value = row(“columnname”).ToString
Then you can make the split like this split(out_cell_value,“,”)(0).ToString to a variable in assign activity, where 0 is the index that you want buddy you can change as per your wish
FInally you can use send outllook mail activity to send the mail through outlook and to attach the file you can mention the path of the newly saved file as string argument
Thats all buddy you are done
Kindly let know whether this works or not buddy
Cheers @vikumars1
if you are not sure about the sheet names, let the bot itself identify the sheet names from the excel and you can by this
–when you us a excel application scope, that activity has a output variable of type workbook
get that variable named out_workboook
–use a assign activity to get the sheetname of that workbook like this
out_sheetname = out_workbook.GetSheets(0),
well you can use 0 if you have only one sheet
or if there are many sheets inside and you want to iterate with each sheet and get data from sheet you can pass the Out_Workbook.GetSheets to a for each loop with type argument as string , and inside the for each loop use a assign actiVity to get the sheet name like this
out_sheetname = item.ToString
-now pass this out_sheetname to the read range activity for the input sheet name buddy @vikumars1
Then for
2. If you dont have the column name you can use the column index buddy and index starts from 0 for the first column like this
out_cell_value = row(Columnindex).ToString
like
out_cell_value = row(1).ToString
where 1 implies the second column
Thats all buddy you are done
Kindly try this ad let know whether this works or not buddy
Cheers Buddy @vikumars1
Hi @vikumars1
1 use start process with your excel file path as your input
2. use a send hot key activity with keys ctrl+A and select the excel as element
3. use again send hot key activity with keys ctrl+D
4 finally a send hot key activity with keys ctrl+s
thats all buddy
Cheers @vikumars1