Writing datatable to .csv file (tab delimited)

Hi,

Thanks for your help in advance.

I have datatable initially come from a specific .DAB file. I converted it to .txt file for use by using a software and I open .txt with Excel application to get data from it. On the datatable, I’m trying to do some manipulation (adding data to certain columns and filtering empty rows) and I want to save the output as .txt or .csv with tab being set up as delimiter but I’m facing some issues:

  1. If I get data from .CSV, it will not populate headers when extracted as datatable so error gets thrown when i’m trying to make some modification based on the column name.

  2. If I get data from .XLSX, it will populate headers so I can transform the datable to whatever form i needed as an outcome. But when I write it back to an Excel (.XLSX and .CSV), text alignment will be off and all data table is being stored in the first column.

Can anyone has experienced in a similar situation help me on this? That will be greatly appreciated.

Thanks,
J

@ogkaiser93

Use Read Text activity to read the .txt file
Use Generate Data Table activity to save as data table, Enable CSV parsing, Use First Row as headers, CSV parsing-> Tab

This will generate headers for your Datatable

Hope this helps you

Thanks

@ksrinu070184 HI thanks for the quick reply.

What you explained makes total sense but it still outputs the entire datatable within the first column and so when i do manipulation, data is not aligned in a way that it should be. Can you think of why?