How to convert CSV files to Excel files.(Power Automate Desktop)

08/29/2023

Japanese version.

Introduction to transcribing a CSV file to an Excel file with its contents intact.

This flow does the opposite of How to convert Excel files to CSV files.
This flow can be configured to support not only CSV, but also TSV, arbitrarily delimited files, and fixed length formats.

Overall view of Flow

Robin(for copy and paste)

It can be copied and pasted into Power Automate Desktop.

File.ReadFromCSVFile.ReadCSV CSVFile: $'''C:\\Test\\test.csv''' Encoding: File.CSVEncoding.UTF8 TrimFields: True FirstLineContainsColumnNames: False ColumnsSeparator: File.CSVColumnsSeparator.SystemDefault CSVTable=> CSVTable
Excel.LaunchExcel.LaunchUnderExistingProcess Visible: False Instance=> ExcelInstance
Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: CSVTable Column: 1 Row: 1
Excel.CloseExcel.CloseAndSaveAs Instance: ExcelInstance DocumentFormat: Excel.ExcelFormat.FromExtension DocumentPath: $'''C:\\Test\\Result.xlsx'''

Flow creation steps

Set up Read from CSV file Action to specify the file to be read and its format.

Next, set up  Excel Launch Action.

ParameterValue
Launch Excelwith a blank document
Make instance visibleOFF

Next, set up a Write to Excel worksheet Action.

ParameterValue
Value to write%CSVTable%
Write modeOn specified cell
Column1
Row1

Finally, set up Close Excel Action and save the file.

ParameterValue
Excel instance%ExcelInstance%
Before closing ExcelSave document as
Dodument formatDefault(From Extension)
Dodument pathDestination file path.

For those who want to learn Power Automate Desktop effectively


The information on this site is now available in an easy-to-read e-book format.

Or Kindle Unlimited (unlimited reading).

You willl discover how to about basic operations.

By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.

Links

Tips(Power Automate Desktop)