Hi,
I need to read a range and the write it into a .tsv excel file.
Using write range activity, UI Path throws an error: Only .xlsx format supported.
Hi,
I need to read a range and the write it into a .tsv excel file.
Using write range activity, UI Path throws an error: Only .xlsx format supported.
Hi @Bhanu_Rathore ,
i hope i understood your query well. you have used read range to read the .XLSX file inside the Excel not from the Workbook. please check it once. whether you selected read range inside the excel not from the workbook. please find the image below !
and if you wants to write in to an excel file i hope you were used Excel Application scope inside this you need to use Write range
your entire workflow should look like this
and i have used write range to write the data into excel. if you wants to writr into csv just drag and drop write csv. you can find only one write csv activity.
if you have any queries please let me know
Thanks&Regards
NaNi
Am I right to suppose you just call it an Excel file, but in fact it is a CSV file with Tab delimited?
Then this is what you want:
https://docs.uipath.com/activities/docs/write-csv-file
Hi, @moenk @THIRU_NANI
Yes. I did the right thing. But its a .tsv file (not csv)
I can open .tsv through notepad as well and paste the excel data into it using copy to clipboard activity. But there are commas in the pasted text.
So now im stuck at this point: How to read a range and paste it into a notepad (without commas)
Files attached:
FIles.zip (7.3 KB)
Hi! @Bhanu_Rathore,
Do one thing after you copied the text. use Regex(Replace) activity.
please refer How to manipulate a part of string: Split, Trim, Substring, Replace, Remove, Left, Right
Regex(Replace) you can see the activity below
i extracted your text it will select all the commas inside the text please refer the below image
please make some changes in your replace activity
RegEx-Advanced Value_field just use symbols- backward slash with comma (This will select the every comma in your text) dont make any changes then save it. this will remove all the commas which is present in your entire text.
Thanks&Regards
NaNi
Hi @THIRU_NANI
Could you please attach xaml here?
Yes you can. i just have used your output text to select the commas to show how exactly that activity works. you have your output file right. below that output file use RegEx activity. then save it.
Thanks&Regards
NaNi
Thanks for your reply @THIRU_NANI
Replacing the comma would change the outlay. I need to upload this file and if i replace then the portal where i need to upload it, will not accept the file.
-I just need to select whole data in sheet (ctrl + A)
i have created your workflow please check below. i regret to inform you that i couldn’t find the .tsv format. i just write in to .txt file.
please find the attachment below.
Main file:
Main.xaml (7.1 KB)
Input file:
Input Excel file.xlsx (8.6 KB)
output file:
Op.txt (1.6 KB)
if you have any queries please let me know and if this works for you mark this as solution.
Thanks&Regards
NaNi
This video could help you: UiPath | Read CSV File | Add Column to CSV File | How to read CSV File and Add Data Column to CSV - YouTube
Or this video: UiPath | Convert Text File to CSV File | Get Data from Text File into CSV File | Create CSV File - YouTube
Best regards
Mahmoud
Hi @THIRU_NANI
Thanks a lot for this. But i need output (.txt) in this exact format (see attached file).
(Try to compare your output with the attached file)
This format in text file i get only when I paste the whole data manually.
output.txt (1.6 KB)
In RegEx i just gave only one space instead of two spaces. u can find that in Replace Activity in the properties check the Replacement section i just given 1 space inside the QUOTES. try to give 2 spaces. if still u couldn’t get the perfect output which is there inside the Output.txt. just increase the spaces.
i hope this will works for you.
Thanks&Regards
NaNi
You just need to select Tab as delimiter in write CSV Activity.