The created report.csv file shows the correct content in 3 tables, which is perfect. But there is one issue. The content contains a german umlaut like Ä,Ö,Ü and these are not displayed.
No problem, when I use -Encoding unicode, everything looks fine.
But now it gets weird:
As soon as I add the encoding
Export-Csv seems to ignore the Delimiter, as from now on I will only have one table in the report.csv.
Can somebody please explain to me why this is happening? I need the data in 3 tables like I builded the array, but I also need it with the proper encoding.
I assume you meant columns when you say tables, right? … did you try another encoding? … like UTF8? Did you try another delimiter? Could you post some sample lines of your data from “before” and from “after” the export? Please format these sample data as code as well.
sorry, did not see your reply directly. Yes, I mean colums, sorry.
When I use the Delimiter “,” the report will only have onw column. With “;” as Delimiter it has 3 columns like it should. I did not test any other Delimiter.
I am not quite sure what you mean with “before and after the export”. The sample above shows the content of report.csv with using Delimiter “;” and without using -Encoding Unicode.
The content of $DataArray in the console is:
Benutzer Termin Änderungsdatum
-------- ------ --------------
c12345 2019-02-26T16:00:00+01:00 Samstag, 2. März 2019 12:41:28
c12345 2019-02-23T10:10:00+01:00 Samstag, 2. März 2019 23:52:37
c12345 2019-02-27T10:00:00+01:00 Samstag, 2. März 2019 12:46:08
c12345 2019-02-23T09:30:00+01:00 Samstag, 2. März 2019 11:47:48
c12345 2019-03-02T09:30:00+01:00 Samstag, 2. März 2019 10:10:33
c12345 2019-02-22T15:30:00+01:00 Samstag, 2. März 2019 11:51:53
c12345 2019-02-23T11:30:00+01:00 Samstag, 2. März 2019 11:55:58
c12345 2019-02-25T07:30:00+01:00 Samstag, 2. März 2019 12:01:03
c12345 2019-02-26T10:00:00+01:00 Samstag, 2. März 2019 12:21:03
Hmmm … that’s gonna be hard to debug without your environment. … we Germans with our Umlaute … How do you invoke the exported data? With Excel or do you import them back to Powershell? Try do use another delimiter. Just omit the paramter. The comma is the default.