How to Batch Convert CSV files to Excel Using FileSculptor

With FileSculptor you can convert multiple CSV files appending the data to a Excel Spreadsheet or convert multiple CSV files to multiple Excel files with the same name. After source files are converted, they can be moved to another folder.

For this example, we will use the folder C:\Convert\Input to store five CSV files and move the files to C:\Convert\Processed folder after processing. FileSculptor will append all data in these files to a spreadsheet in C:\Convert\Output folder.

tree_folder_input_batch_csv

Run FileSculptor and configure it to convert a CSV file to Excel format. The first screen shown is the Import screen, where you can select the file to import. Keep the File Type as CSV and click on “Browse…” button to select the CSV file on your computer.

Select the first file so FileSculptor can read its fields an data.

filesculptor_screenshot_select_source_batch_csv

Check the option “Process multiple files”, you can adjust the filter if needed and click on “View Files…” button to review the batch file selection

filesculptor_screenshot_view_source_multiple_files_csv

Check “Move files to another folder after processing” option and select the Processed folder clicking on the little folder icon. FileSculptor will process all files and move then to the Processed folder. With this configuration, when there are new files to be processed, put the files in the folder C:\Convert\Input and run the conversion project again.

filesculptor_screenshot_browse_move_files_folder

Configure all source properties like you would in a simple conversion job, using our guide How to Convert CSV to Excel Using FileSculptor.

Click on Export tab to show the configure the file to export. FileSculptor supports Excel spreadsheets in XLS format (used in Excel 97 to Excel 2003) and XLSX format (used in Excel 2007 to Excel 2016). Select the desired format and click on “Browse…” button to define folder location and file name. You can use an existing file or create a new file.

filesculptor_screenshot_create_destination_xlsx_batch

If you want to create a destination file with the same name for each source file, check the option “Rename destination file to same name as”. If you want to append all data in the source files to one single destination, select the option “Append content to the end”. FileSculptor will create the destination if it does not exist, and if it exists it’ll append data to the end of the data already in the destination.

filesculptor_screenshot_destination_csv_properties_batch

Then select fields from the source, you can also reorder fields. If you simply want a copy of data in the source file, click on “Add All” button to add all fields from source to destination. A preview grid shows how the will be written on destination.

filesculptor_screenshot_destination_xlsx_preview_batch

Click on Run tab to do the conversion. Click on “Run Now” button and FileSculptor will process all files in the folder C:\Convert\Input and write all data in the source files appending it to the destination file.

filesculptor_screenshot_run_csv_xlsx_batch

Save the project to do the same file conversion again when needed. You can also use the Automation tabs to create an icon shortcut on the desktop to do the conversion with one click or the parameters to create a scheduled task or run from command prompt.

The FSRUN utility brings support for command-line operations, using the same conversion projects created by FileSculptor. You can use it in BATCH files or schedule jobs in Windows to convert files frequently.Command-line support

Below is a sample batch file using FSRUN to convert all CSV files in INPUT folder, appending data to a spreadsheet in OUTPUT folder, and moving the processed files to PROCESSED folder if the conversion succeeded or ERROR folder if the conversion failed.

@echo off
rem call subroutine "onefile" for each file to be processed
for %%f in (.\input\*.csv) do call :onefile "%%f"
rem main program must end with exit /b or goto :EOF
exit /b
rem SUBROUTINE "ONEFILE" ---------------------------
:onefile
echo Processing file %1...
rem convert file, moving it to processed folder if conversion succeeded
rem or to error folder if conversion failed
fsrun -r convert.fsc -src:source1 %1 > nul 2>&1
if not errorlevel 1 (
echo Processing of file %1 succeeded!
move %1 .\processed\
) else (
echo Processing of file %1 failed!
move %1 .\error\
)
exit /b
Download Online Store