joao_adelio1
(Joao Paulo da Silva Adelio)
June 10, 2021, 6:14pm
1
Hi,
I create a csv file with write csv activity, and leave the encoding blank or “utf-8” and in both situations the file is “utf-8 with BOM”. My Studio version is enterprise 20.10, I saw a post to do via PowerShell script but I don’t know how to do it, can you help me please?
https://forum.uipath.com/t/how-to-convert-a-txt-file-with-ansi-coding-to-utf-8-without-bom/60455/4
ppr
(Peter Preuss)
June 10, 2021, 6:23pm
2
have a look here on writing it out on UTF-8 without BOM
@vandame
welcome to the forum
give a try on following:
[grafik]
[grafik]
Ensure following:
[grafik]
joao_adelio1
(Joao Paulo da Silva Adelio)
June 10, 2021, 6:31pm
3
is it correct the way I did it? but it’s giving an error
ppr
(Peter Preuss)
June 10, 2021, 6:35pm
4
you have to convert the datatable into a string before.
Depending to your requirements on csv:
use the output datatable activity
or do it custom
in case you need more help on this, let us know the requirements for the csv like delimiter char etc.
joao_adelio1
(Joao Paulo da Silva Adelio)
June 10, 2021, 6:38pm
5
I need help yes, I’m new to the RPA world, the csv delimiter is semicolon keeping the header.
ppr
(Peter Preuss)
June 10, 2021, 7:05pm
6
give a first try on following:
Variables:
Flow:
strHeaderLine =
String.Join(";", dtData.Columns.Cast(Of DataColumn).Select(Function (x) x.ColumnName))
DataLines =
(From d In dtData.AsEnumerable
Let s = String.Join(";",d.ItemArray)
Select s).toList
DataLines = DataLines.Prepend(strHeaderLine).toList
strCSV = String.Join(Environment.NewLine, DataLines)
input/output:
1 Like
joao_adelio1
(Joao Paulo da Silva Adelio)
June 10, 2021, 7:32pm
7
I did everything as you told me, I’m still wrong
ppr
(Peter Preuss)
June 10, 2021, 7:38pm
8
ensure following import is done or import it:
joao_adelio1
(Joao Paulo da Silva Adelio)
June 10, 2021, 7:52pm
9
It worked, thanks for your willingness to help me solve the problem, you’re awesome
system
(system)
Closed
June 13, 2021, 7:53pm
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.