Is there any Flexcel function that exports the spreadsheet generated in these formats or do I need to write a code to read the value of each cell and write to a TXT / CSV file?
The encoding might be UTF8, Unicode, ASCII or ANSi depending on how you want to save the file. The separator is normally #9 (tab) ',' (comma) or ';' (for non-english versions of Excel).
Note that in APIMate, there is also a button at the left "Save as CSV" which will show you this line too if you click it.
The "save" overload covers most needed cases. If you need more options, or if you want to save as prn (that is, fixed length columns instead of comma separated values, where each filed has a fixed length), you can use xls.Export: