Here in the code above , "filename" is the name of the file in which we need to download the DataTable.

"MyObCustomerCard.txt" is the file which I have created manually and kept it in a separate "contents" folder in the root directory.

"ExportDataTabletoFile()" is a method which writes the data into the text file. We need to pass arguments to this method; namely DataTable, Delimeter (in this case "tab" is passed) , true or false for (whether to write column headers in the file) and file name with path.