Mike Eghtebas
asked on
Store the words in a .txt file in a table...
test.txt contails some text in multiple lines. There is alos some occassional blank lines in it.
Question: How to store the words in it in a table in Access.
A blank space(s) separates the words.
Thank you
Question: How to store the words in it in a table in Access.
A blank space(s) separates the words.
Thank you
ASKER
re> have you tried importing the text file?
The lines in the text file are sentenses. These sentenses need to be disected (maybe using split function/method). The array produced needs to be cycled and its content (the words) then could be entered in the table.
Or there maybe a better way to do this. I am a bit rusty doing the above I thought I ask for some assitance.
Thanks,
Mike
The lines in the text file are sentenses. These sentenses need to be disected (maybe using split function/method). The array produced needs to be cycled and its content (the words) then could be entered in the table.
Or there maybe a better way to do this. I am a bit rusty doing the above I thought I ask for some assitance.
Thanks,
Mike
If there is some way you can get the words into cells of a table, then you can work with the table as a data source for import into an Access table. See my old Code Sample 8 on this topic:
http://www.helenfeddema.com/Files/code8.zip
http://www.helenfeddema.com/Files/code8.zip
ASKER
re:> If there is some way you can get the words into cells of a table
This is what I am trying to accomplish in this question. This is like a circular answere, lol.
Thanks,
Mike
This is what I am trying to accomplish in this question. This is like a circular answere, lol.
Thanks,
Mike
you can read the text file line by line and decide how you want to treat the read lines.
post the text file here and explain how you want it parsed/dissected
post the text file here and explain how you want it parsed/dissected
ASKER
I am disappointed at myself for not being able to describe this easily so others could understand it. Here I am repeating my original questions with examples:
test.txt contails some text in multiple lines.
---- test.txt--------
Water date 5/78
tomorrow yesterday ...
Monday appointment
---- end of test.txt--------
Question: How to store the words in it in a table in Access.
-------------tWord in Access----------
ID Word <-- field names
----- -------
1 Water
2 date
3 5/78
4 tomorrow
5 yesterday
6 ...
--------------- end of the table tWord----
Please let me know if this is not clear,
Regards,
Mike
test.txt contails some text in multiple lines.
---- test.txt--------
Water date 5/78
tomorrow yesterday ...
Monday appointment
---- end of test.txt--------
Question: How to store the words in it in a table in Access.
-------------tWord in Access----------
ID Word <-- field names
----- -------
1 Water
2 date
3 5/78
4 tomorrow
5 yesterday
6 ...
--------------- end of the table tWord----
Please let me know if this is not clear,
Regards,
Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.
External Data > select Text file from Import group
follow the wizard
if you want to do this using automation, you need to create an import specification.