Toad World® Forums

Import CSV file to exports as excel

Using Toad Datapoint 3.7, is it possible to open an exsisting csv file using the automation script in TOAD, then save it as an excel file? I see where you can save it into a table, but I just want basicly convert the csv to an excel file.


You may want to try ‘Copy File’ task under ‘File Activities’ where you can

a. Add .txt file or .csv file in the Source file tab (E.g. Contact.txt)

b. In the ‘Copy to folder’ tab, add the folder name of the folder where you want to place your output (Output)

c. Add the output name as .xls in the ‘Copy name’ tab (Contact_output.xls)

Hopefully this should give you the desired result.

Alternatively, like you mentioned, we can create a table to export it. Say, add a csv file as csv connection (CSV_table_name) and use the ‘Select to file’ task to export it to an excel using select * from CSV_table_name.

I can think of 2 ways to do it.

  1. Make a csv connection in your connection manager, and add a export wizard template activity to export data from the csv connection to a Excel file.

  2. User local storage connection or other database connection, add an import activity to import the data in csv to a table in this connection, add an export activity afterwards to export the data from this table to Excel file.

Hope this helps. Please let me know if you need any clarification.

If you are automating this you need a generic name for your csv file so the connection always connects to the same file name (the column order and number of columns needs to be the same in subsequent files also). Then you can copy each new file (copy standardName*.csv StandardName.csv) in a step prior to extracting to Excel. Then after move the full file name to another folder or delete it. That way StandardName20151020.csv (in the input folder) gets copied to StandarName.csv (in the processing folder) for which you already have a connection set up, then export to Excel, then move (to an archive folder) or delete StandardName20151020.csv.