Text file to Excel File Help Please.

wsmierciak

New member
Joined
Jan 31, 2006
Messages
3
Programming Experience
Beginner
Ok, the things I need to do here, are a pain, however I'm not sure if this is the easiest way, or just the only way I can think of.

I am pulling the event log from a server to a text file with only the data that I need. It writes to the file and each event in the log is seperated with an underscore that is 20 characters long.
what I want to do is after the underscore, I want to pull the users name, and 3 different lines from the evt.message text. These would be Logon ID:, User Name: and Client Name:. (the last one is the PC name if they are on the outside of the network)

So, being that I've only been using VB.net for a week or so, and am Struggling so hard...I'm broke buying books and still can't figure this out.

My objective is to take the data from the text file, only get the data/lines that I need, copy them to fields in excel...and keep it all sorted by the Logon ID: (which is a numerical value, not a user name).

so what I'm doing is taking the logon time and putting the Logon ID number in the first cell. Logon ID, Date and Time. Then on the next set of cells in the same row will be logoff time based on the same guid.

Like I said, i'm not sure how to word it...but I want it to see if the guid ID from the text file is there already in the excel file..and if so, only write the Logoff time, otherwise write a new line. I should never have a logon with out a logoff without having a system failure.

is this possible...and can anyone point me in the right direction? or tell me that what I'm smoking is impairing my ideas of what I need to do?

Thanks.

William
 
Back
Top