0

We are looking into writing a C# program which will export Event Viewer logs into csv file.

DateTime              |Level    | Source | EventID | Detail
06/16/2016 10:11:01    Error       ABC      100      Detail of event error

Can you please guide/hint if you knows anything which suits for this? Thank You!

1 Answer 1

1

This application exists of two parts. 1. Reading the eventlog 2. Writing to a csv file

Reading the eventlog is built in to .NET. Examples can be found here. The application might need administrator rights to do this.

For writing to a csv file you can use the .net file and stringbuilder classes. In a csv file each line is a row and columns are split by a comma. This is already discussed in an other question: Writing data into CSV file

Sign up to request clarification or add additional context in comments.

1 Comment

It helped, Maiko. Thank you! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.