hi i have a query regarding data extraction..i want to know if there is a way of extracting data from a notepad into an excel sheet in a table format..My data is in the below format;
Name;xyz
Dob:11/11/11
Address:wewr
Country:usa
I want it in a table format like:
Name Dob address country
xyz 11/11/11 wewr usa
is this possible..Thanks
There is a way.
There are variations on this as well. Good luck!Dim myPath as String Dim readLine as String Dim fieldIndex as integer myPath = "C:\myFile.txt" fieldIndex = 1 Open myPath For Output As #1 Do Until EOF(1) Line Input #1, readLine 'readLine is a variable that holds an entire line of your data so you can parse it however you need to. 'I usually index the fields in a case. line 1 is name, 2 is DOB etc. Select Case fieldIndex Case 1 'Code to parse name Case 2 'Code to parse Dob 'At the last case set the fieldIndex back to 0 End Select fieldIndex = fieldIndex + 1 Loop Close #1
Excel\Access, VBA, C#, C++, SQL, Java
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks