I’m currently facing an issue while trying to append data to a text file using UiPath Studio Web. I’ve been using the “Append Line” activity in the “Write to File” category to achieve this. However, I’m encountering some difficulties with specifying the file path.
When I select the “Use Local File” option and provide a local path from my system, the data is not being appended to the text file as expected.
Additionally, when I try to use the “Use a File Resource” option, I’m unsure about what to provide in that field. Could someone guide me on how to properly specify the text file path when using this option?
I’ve tried the following:
Use Local File: I provided my system’s local path (e.g., C:\MyFolder\myfile.txt), but the append operation is not working.
Use a File Resource: I’m not sure what path or resource identifier I should provide here. Could someone clarify how to correctly provide the text file path in this case?
I would greatly appreciate any insights or guidance on how to resolve this issue. If anyone has successfully worked with the “Append Line” activity to write or append data to a text file using UiPath Studio Web, your assistance would be invaluable.
As a robot for Studio Web is cloud serverless robot and it runs on cloud, “local file” means file system of the cloud serverless robot. So if we need to give text data to the process, it might be better to put text file at cloud drvive such as gdrive, one drive etc, then read the file. Many activities returns FileResource type and we will be able to use it in ReadTextFile activity.
Hi Yoichi, thank you very much for your time and support.
I still have an issue. I’ve been attempting to write an array of strings into a text file hosted on Google Drive. However, during my efforts, I encountered an error message that reads as follows: “Option Strict On disallows implicit conversions from ‘String’ to ‘ILocalResource’”
I believe this error might be related to the concept of working with cloud-based resources and local files in a Studio Web environment. Could you please guide me on how to address this issue and properly handle file resources in the cloud environment of UiPath Studio Web?
I would greatly appreciate any insights, guidance, or experiences that you can offer regarding this scenario. Thank you in advance.
Hi,
Error got resolved with GetTextFile.ToLocalResource but we are not able to append the data in the Text File which is in Gdrive.
I’ve followed a specific process, but I’m not able to successfully append data to the text file. Here’s a breakdown of the steps I’ve taken:
I used the Set Variable Value activity to assign an array of strings to a variable.
Then, I used the Get File/Folder activity from Google Workspace to select the text file located in my GDrive. I created a variable named GetTextFile of type GDriveRemoteItem to hold the retrieved file.
After that, I added a For Each activity and passed the array variable to it.
Inside the For Each loop, I used the Write Text File activity with the following configurations:
Write To File: GetTextFile.ToLocalResource
Text: currentText
Despite following these steps, I’m not able to write data into the text file. I’m wondering if I need to follow a different process or if there’s something I might be missing. Any insights, guidance, or suggestions to resolve this issue would be greatly appreciated.
I had the same issue working with Onedrive. Turns out the way this works is the ToLocalResource effectively downloads the file. You are then updating a local copy in the execution space of the cloud robot. You need to add an additional activity to upload the file to GDrive again.