Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Parsing a text into Excel sheet

  Asked By: Diane    Date: Nov 09    Category: MS Office    Views: 1027
  

I would like to know whether VBA Excel could process a
text file containing the SCADA event log and come-up
with a process output as shown below. I am currently
trying to manipulate it via MySQL text import. I hope
somebody already encounter a problem like this. Please
view the sample without word-wrap in notepad. Thanks

SCADA Event Log (saved as pure ASCII text file named
"scada.log")
---------------
12/1/04 0:14:23 505 Avenue Park 425PD4 34.5 kV Open
Abnormal
12/1/04 0:16:31 116 Avenue Park 425PD4 34.5 kV Closed
Normal
12/1/04 0:18:39 505 Avenue Park 425PD4 34.5 kV Open
Abnormal
12/1/04 0:18:41 116 Avenue Park 425PD4 34.5 kV Closed
Normal
... more events

Expected Output (saved into a sheet column A through G
---------------
Date Station Feeder Volt Open Closed
Duration
12/1/04 Avenue Park 425PD4 34.5 kV 0:14:23 0:16:31
0:02:08
12/1/04 Avenue Park 425PD4 34.5 kV 0:18:39 0:18:41
0:00:02
... more output

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Shannon Freeman     Answered On: Nov 09

Did the message Word wrap or are these two line messages with Abnormal and
normal on the second line?

Try using the Record macro and record the OpenText command when you open the
file using the fixed width option (as opposed to delimited)

 
Didn't find what you were looking for? Find more on Parsing a text into Excel sheet Or get search suggestion and latest updates.




Tagged: