|
Home > Archive > Getting Started with dBASE > November 2006 > importing delimited with tab
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
importing delimited with tab
|
|
| george 2006-11-17, 12:12 am |
| Hello,
Anyone has any experience or easy way to programatically importing .txt files delimited with tab instead of a comma ?
in dBaseIV, I tried using
append from xxx.txt delimited with chr(9)
didnt want to work!
George
| |
| Roland Wingerter 2006-11-17, 5:16 am |
| "george" wrote
>
> Anyone has any experience or easy way to programatically importing .txt
> files delimited with tab instead of a comma ?
>
> in dBaseIV, I tried using
> append from xxx.txt delimited with chr(9)
> didnt want to work!
-------
There is no easy way, not in dBASE IV and not in the current version.
The command option "delimited" refers to the delimiter enclosing character
fields (default is quotation marks), not to the field separator (default is
comma).
In order to import a text file which uses fields separators other than comma
(tab, semicolon, ...) you could write a program, though I am not sure if
dBASE IV has functions for low level file access. It can be done in dBASE
Plus, and there also is a importData.wfm in the dUFLP which imports a wide
variety of formats.
With dBASE IV your best bet is to open the file in Excel and save it in dbf
format.
Roland
| |
| David Kerber 2006-11-17, 7:12 pm |
| In article <RDxjg#hCHHA.1144@news-server>, ich@hier.de says...
> "george" wrote
> -------
> There is no easy way, not in dBASE IV and not in the current version.
> The command option "delimited" refers to the delimiter enclosing character
> fields (default is quotation marks), not to the field separator (default is
> comma).
>
> In order to import a text file which uses fields separators other than comma
> (tab, semicolon, ...) you could write a program, though I am not sure if
> dBASE IV has functions for low level file access. It can be done in dBASE
It does, and they are quite fast. You just need to read in a line at a
time and search for the tab character, which is chr(9), to separate the
fields.
.....
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
| |
| Jim Higgins 2006-11-17, 7:12 pm |
| On Fri, 17 Nov 2006 08:57:12 +0100, "Roland Wingerter" <ich@hier.de>
wrote:
>"george" wrote
>-------
>There is no easy way, not in dBASE IV and not in the current version.
>The command option "delimited" refers to the delimiter enclosing character
>fields (default is quotation marks), not to the field separator (default is
>comma).
>
>In order to import a text file which uses fields separators other than comma
>(tab, semicolon, ...) you could write a program, though I am not sure if
>dBASE IV has functions for low level file access. It can be done in dBASE
>Plus, and there also is a importData.wfm in the dUFLP which imports a wide
>variety of formats.
>
>With dBASE IV your best bet is to open the file in Excel and save it in dbf
>format.
>
>Roland
Is a simple Real Mode DOS program written as a filter an acceptable
solution?
| |
|
| Also comes the question of proportional fonts in windows, whilst DOS enabled more easily a regular display. Now you will get easier result with proportional fonts such as Courier New, FixedSys and one or two other ones.
Dom
george Wrote:
> Hello,
> Anyone has any experience or easy way to programatically importing .txt files delimited with tab instead of a comma ?
>
> in dBaseIV, I tried using
> append from xxx.txt delimited with chr(9)
> didnt want to work!
>
> George
| |
| george 2006-11-17, 7:12 pm |
|
David Kerber Wrote:
> In article <RDxjg#hCHHA.1144@news-server>, ich@hier.de says...
>
> It does, and they are quite fast. You just need to read in a line at a
> time and search for the tab character, which is chr(9), to separate the
> fields.
>
> ....
>
> --
> Remove the ns_ from if replying by e-mail (but keep posts in the
> newsgroups if possible).
Yes, I am just now working on such a program using dBaseIV, not sure if there is one around already.
| |
|
| Roland Wingerter Wrote:
> With dBASE IV your best bet is to open the file in Excel and save it in dbf
> format.
That's the way I do it. Works fine. (If you have Excel on the computer anyhow.)
RonB
| |
| George 2006-11-19, 7:12 pm |
|
Yes, I managed to accomplish the task to import into a dBaseIV table deliminted by tabs, using two do while statements. Can share it or post it if I knew how.
Thank you.
George
David Kerber Wrote:
> In article <RDxjg#hCHHA.1144@news-server>, ich@hier.de says...
>
> It does, and they are quite fast. You just need to read in a line at a
> time and search for the tab character, which is chr(9), to separate the
> fields.
>
> ....
>
> --
> Remove the ns_ from if replying by e-mail (but keep posts in the
> newsgroups if possible).
|
|
|
|
|