I have datatable generated from text file (csv file) that I want to read and if there is an empty cell, my formatting gets destroyed because some columns have a mismatch then. For example if I read row 2 in the screenshot then the value of column currency is assigned to column reference which I want to avoid.
I tried but the problem is that I have several lines at the beginning of the file that are not part of the actual table I want to work with. Therefore, I read as text and remove those lines separately.
How would that work anyway? If you read the text and store it as a string how would you know until which line to cut the text? And immediately when you convert the string to DT you loose the empty cells…
I solved it myself in the meantime!
Here is my solution in case someone else will hit that topic in the future…
‘Read text file’ activity to read the content
Take the string and do a replace to replace “;;” with “; ;” (space between the semicolons)
‘Generate datatable from text’ activity to generate the DT
In this way I don’t loose empty cells within the table.
@Anil_G I found an older thread where you gave the hint with the blank between the separators so I tried to get that in my string. So thank you.