Copying Datatable values from excel to desktop application all datatable values are copied in single column instead of all the columns.There are total 8 columns in the excel and target application the same number columns.
The columns value are copied correctly using set clipboard activity.
There are some formulas in the excel cell
the datatable is passed to outputtable activity.The string value is passed to clipboard activity.Then i am using hot key to paste into desktop application
output table will convert it to string so it would be pasted only in one…instead try to convert it as tab seaprated values by replacing comma with tab…that might work…
so after output datatable use str.Replace(",","\t")
or copy it manually and chexk what delimiter you are getting by pasting it on notepad
cheers
@Anil_G The solutions which you suggested is not working.
Please find the below delimiter which is coming
“The String value is 1,CNN Chile SD+HD,02/01/2021 00:00:00,0.57787037037037,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.656087962962963,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.677708333333333,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.733472222222222,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.813993055555556,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.825543981481481,20\r\n”
By replacing it with \t I am getting below output which is not working
“The String value is 1\tCNN Chile SD+HD\t\t\t02/01/2021 00:00:00\t0.57787037037037\t20\r\n1\tCNN Chile SD+HD\t\t\t02/01/2021 00:00:00\t0.656087962962963\t20\r\n1\tCNN Chile SD+HD\t\t\t02/01/2021 00:00:00\t0.677708333333333\t20\r\n1\tCNN Chile SD+HD\t\t\t02/01/2021 00:00:00\t0.733472222222222\t20\r\n1\tCNN Chile SD+HD\t\t\t02/01/2021 00:00:00\t0.813993055555556\t20\r\n1\tCNN Chile SD+HD\t\t\t02/01/2021 00:00:00\t0.825543981481481\t20\r\n”
Hi @paras_dalal ,
You can share screen short about your application and your excel?
I think application can not copy and paste, we can read excel to get data table then use for each row of data table,
each row we use type into application
regards,
the delimiter is comma as shown below:
“The String value is 1,CNN Chile SD+HD,02/01/2021 00:00:00,0.57787037037037,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.656087962962963,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.677708333333333,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.733472222222222,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.813993055555556,20\r\n1,CNN Chile SD+HD,02/01/2021 00:00:00,0.825543981481481,20\r\n”
@Anil_G I copy manually from excel which has different columns and rows there is no delimiter observed
After you copy…paste it in the text file then you can see the delimiter between columns
cheers
Hi @paras_dalal ,
My understand is we need merge all data to a String variable, that’s right?
@Anil_G there is space while copying the columns value in text file
let me try to use str.replace(" “,”\t")
@Nguyen_Van_Luong1 I need to copy the excel data(7 Columns Value) as it is to the desktop application
@Anil_G still facing the same issue please find the screenshot below:
@Anil_G did you get a chance to look at excel file?
@Anil_G Sorry i uploaded wrong file which had duplicate values.
I have uploaded the excel from which values are taken
UniqueExcelFilePath.xlsx (11.0 KB)
@Anil_G Still it is not working all the values are pasted in a single column value