I would like to convert an entire Excel workbook with multiple tabs into a csv format - I have tried read then write range that does not work and the write csv activity is not for multiple tabs.
You have to read each sheet and write it to different files or append data to same file if the columns are same
In cav you cannot craate sheets
Cheers
Create datatable variable DT_Final
- Use Excel
** For Each Sheet
*** Read Range into DT_Sheet
*** Merge DT_Sheet and DT_Final
// end Use Excel
Write CSV with DT_Final
Hi @E.T.S ,
change Excel to CSV
I have 2 ways
-
you can use activity read range with each sheet to get data table then write range
-
use invoke marco to convert
Sub Macro1(OutputPath)
ActiveWorkbook.SaveAs Filename:=OutputPath, _
FileFormat:=xlCSVUTF8, CreateBackup:=False
End Sub
You can try it
regards,
Hi @E.T.S
Try this:
-
Use Excel Application Scope to open the workbook.
-
Use Get Workbook Sheets to get a list of sheet names.
-
For Each sheetName in sheetNames:
- Use Read Range to read data from the current sheet.
- Use Write CSV to write the data into a CSV file named after the sheet.
Hope it helps!!
Hey @E.T.S ,
Try below sequence
Excel Application Scope:
- Input: Path to your Excel file
- Output: workbook (Workbook Application Variable)
For Each (sheetName in workbook.GetSheets()):
Read Range:
- Workbook: workbook
- SheetName: sheetName
- Output: sheetData (DataTable Variable)
Write CSV File:
- File Path: Path to your output CSV file (can be dynamic)
- DataTable: sheetData
Hope it helps you out!