How to convert CSV files to Excel files.(Power Automate Desktop)
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.
Parameter | Value |
---|---|
Launch Excel | with a blank document |
Make instance visible | OFF |
Next, set up a Write to Excel worksheet Action.
Parameter | Value |
---|---|
Value to write | %CSVTable% |
Write mode | On specified cell |
Column | 1 |
Row | 1 |
Finally, set up Close Excel Action and save the file.
Parameter | Value |
---|---|
Excel instance | %ExcelInstance% |
Before closing Excel | Save document as |
Dodument format | Default(From Extension) |
Dodument path | Destination 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.
Discussion
New Comments
No comments yet. Be the first one!