Exporting Excel as Text/CSV
The [highlight txt=’export Excel as Text/CSV file’] instruction allows a user to export data from Excel to Text or CSV format.[message type=”warning”]For the purposes of this article we are going to use two simple and fictitious files. They have already been uploaded into a data step. You will want to replace these files with those of your own.[/message]
Before we get started
Please further create a ‘Manipulate a file’ or ‘Multiple file manipulations’ action step so that you can add and use instructions.
The source file that we are going to use looks like this:
The target file that we are going to use is a ‘blank’ text (.txt) file. However, this file is not empty. It contains the words “This file will be used as the Target file”. The reason for this is that an empty text file will have a size of 0KB in SolveXia. A file of 0KB cannot be processed. The words were typed into the file so in order to bring its size above 0KB. Please note this instruction will clear the target text file every time it runs. Therefore, any pre-populated text will be cleared and will not be exist after the instruction is run. All that the target file will contain is what was intended to be imported from the Excel file.
1. Create an ‘Export as text/csv file’ instruction.
2. Link the file named “Source” as the source file and the file named “Target” as the target file.
3. For the Source file, select Sheet1.
4. Use an Advanced Range from A1 to the last cell in ColumnA as far as D.
5. The rule for the character to be used to be delimit data in the text file should be set to ‘Comma’ by default.
6. The rule for how date data is formatted in the Excel file should be set to ‘dd/MM/yyyy, None’ by default.
7. Save and run the step.
8. After the step finishes running, download and open the target file. It will resemble the image below: