Saving .txt files in an unique Excel file

Hello friends,
I would like to save all the files inserted in this zip folder (1.2 KB)
in a single Excel file with successive rows and separate columns.
Can you help me in excecuting this?
Thank you so much,
Camilla. :slight_smile:

Hi CamiCat,

Just to understand more, each file has 2 lines of data, so overall you want your data in 10 rows in an excel and for columns what is the delimiter( separator ) is it β€œ;” if not what else ?

Thanks ,

1 Like

Hello @harinathreddy.yn,
the file doesn’t have a fixed number of lines.
The delimeter for the columns is the β€œ;”.
Thank you so much.

What you will need to do is use .GetFiles() to store the text files in a list.
Then, use Append Text to combine them to one string.
Then, replace all commas with something else (if they have commas), and replace the β€œ;” with the β€œ,” comma so it will be a comma-delimitted text.
Then, finally you can just use Write Text File and use β€œ.CSV” as your extension, which will place the file into a table format (which you can use with Read CSV or whatever else.

For each file In System.IO.GetFiles("directory","*.txt")
    Append Text // using file

Assign text = text.Replace(",",".").Replace(";",",").Trim
Write Text File // using appended text with ".CSV" extension

Read CSV // if you want the data table. If not, then you are done

So I hope this helps.


1 Like

@CamiCat BrowseAllFilesInDirectory.xaml (16.3 KB)

try above file it will work

1 Like

Thank you so much @Manjuts90.
I’ll try this workflow and let you know.
Thank you so much in advance.