Create CSV

Hi Guys,

i am working on an automation workflow which i need to output the datatable to a new file in csv format in sharepoint.

The web studio dont have create csv(sharepoint) activity available and i tried with create csv(local) but no go.

Any idea?

Kind regards
Kelvin

HI Kelvin,
Since Studio Web doesn’t have a direct “Create CSV (SharePoint)” activity, the best approach is to first convert your DataTable into a CSV string and then create or upload the file directly into SharePoint using the Microsoft 365 activities.

Here’s the simplest way:

Recommended Approach

  1. Convert the DataTable to CSV text:
  • Use the Output Data Table activity and store the result in a string variable (e.g., csvText).
  • Set the column delimiter as ,. If your data might contain commas or special characters, you can wrap values in quotes.
  1. Create the file directly in SharePoint:
  • Use the Microsoft 365 “Create File” activity.
  • Choose your SharePoint site and library, and give the file a name (e.g., /Reports/Export_2025-07-30.csv).
  • Set the file content to the csvText string you generated earlier.
  • Make sure to set the content type to text/csv; charset=utf-8.

This way, you avoid writing anything to a local folder (which doesn’t work in cloud robots anyway) and directly save the file in SharePoint.

Other Options

  • If you prefer, you can create the CSV in OneDrive and then use the Copy File activity to move it to the right SharePoint folder.
  • For advanced users, you can also use the HTTP Request activity with Microsoft Graph API to upload the file, but that’s usually not necessary.

Why “Create CSV (local)” doesn’t work

When you use Create CSV (local) in Studio Web, it tries to write the file on a temporary cloud robot machine. You won’t be able to access that file, so it’s not a viable option.

hope my inputs are useful!

@mcc.it,

You will have to create CSV file on local drive using - Export to CSV activity where your bot is running and then upload it to SharePoint.

1 Like

Hi @mcc.it ,

In the destop version use the UiPath.CSV.Activities

Activities - Write CSV

  • Input: Your DataTable
  • FilePath: A temporary local path like "C:\Temp\ProcessedData.csv"

use UiPath.MicrosoftOffice365.Activities to help you upload in sharepoint
Activities - Upload Files

i cant find the create file in microsoft 365 activity, i tried create workbook but that doesnt works.

use create file activity and give file name with csv extensition.

@mcc.it

there is a workaround you can use

Have a dummy csv file uploaded to storage bucket

then convert your datatable to csv string using ‘output datatable as text’ activity

then you can use write storage text to write the data to existing file in storage bucket

now that can be uploaded to sharepoint as needed

cheers