Convert Excel file (.csv) to (.xlsx)

How to copy a file from one location to another location but save it as an excel file?

Copy an save the file with.xlsx extension

I tried it, but it didn’t open the file.

Hi @dvojinovic,

Welcome to the forum community, if your csv file doesn’t have more than one sheet means, then you can simply read the CSV data using read CSV activity after that your value will be stored in datatable variable, with the help of write range activity you can easily copy the CSV data into .xlsx format

Robinnavinraj S

Hi @dvojinovic

use the read csv activity to read the csv file and store it in a datatable. Use the write range workbook activity to write the datatable to excel.
Give the required location to store the excel file in Write range workbook activity.
It was the simple to do make the things easier.

Hope it helps!!

Hi @dvojinovic ,

Can you share sample csv file for reference. I can provide you multiple solution with workflows.

Hi @Dinesh_Guptil

Welcome to UiPath Community

You can use the below code in Invoke code activity selecting C# as the language and passing CSV path and excel path to the invoke code

// Create a new Application.
Application excelApplication = new Application();

// Open CSV file in Excel.
Workbook csvWorkbook = excelApplication.Workbooks.Open(csvFilePath);

// Save as XLSX file.
csvWorkbook.SaveAs(xlsxFilePath, XlFileFormat.xlOpenXMLWorkbook);

// Close the CSV workbook.

// Quit the Excel application.

Is it possible to share your csv file (199.9 KB)