Exporting to Text
The [highlight txt=’export to text file file’] instruction allows a user to export data from an Access database Table to Text 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 contains the following data:
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 text file.
1. Create an ‘Export to text file’ instruction.
2. Link the file named “Source” as the source file.
3. Use Table1 from the source file.
4. The rule for the character to be used to be delimit data in the text file should be set to ‘Comma’ by default.
5. Tick the box for the ‘Export column headings to the target?’ rule.
6. The rule for how date data is formatted in the Excel file should be set to ‘dd/MM/yyyy, None’ by default.
7. Link the file named “Target” as the target file.
8. Save and run the step.
9. After the step finishes running, download and open the target file. It will resemble the image below: