Click here to Skip to main content
15,888,008 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi all
I want to convert my .evt(event Viewer) file into .txt and .csv using c# code.
Please help
TIA

What I have tried:

I have searched on Google But did not find anything.
Posted
Updated 26-Sep-17 3:11am

1 solution

You should work on your Google skills. Searching for "c# evt file reader" provides lot of results including the CodeProject article Parsing event log(*.evt) file[^]. Most will generate a list control based GUI output. But modifying that to create a textual file instead should be no problem.

If you did not find anything that matches your requirements, you can still write your own converter. Then have a look at the Windows Event Viewer Log (EVT) format[^] which describes the EVT file format.
 
Share this answer
 
Comments
sumitk.cadc 26-Sep-17 9:23am    
hi Jochen,
I need to convert .evt file in other formats like .csv or .txt.
Jochen Arndt 26-Sep-17 9:35am    
Where is the problem?
The first link contains code to read and parse EVT files. Instead of showing the results in a list control, write the data to a text file using appropriate separators (e.g. comma and line feed for CSV and quoting fields that contain the comma the quote character). Or perform a quick search on C# CSV writers.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900