Importing/exporting data with carriage returns (I Think)
Boaz Bezborodko
boaz at mirrotek.com
Fri Aug 25 14:04:59 PDT 2017
Top post:
Why not import using "new line" for new record?
From the manual:
ASCII:
Then: import ASCII name R=r F=f O=o C=c
or:
Then: import ASCII name=pathname R=r F=f O=o C=c
where "name" is the name of the import file and "pathname" is a full or
relative pathname. Use the pathname option when the merge file is not in
the current directory.
"r" is record separator
"f" is field separator
"o" is opening field delimiter
"c" is closing field delimiter.
Example:
Then: IMPORT ASCII test=test.txt R=^J f=\^
....
IMPORTANT:You may use a few special codes with the IMPORT ASCII format
to identify delimiters or field separators:
\r for carriage return
\f for form feed
\n for new line
\t for tab
Notepad++ can be used to change EOLs from CR/LF to LF and back again.
Boaz
> Message: 3
> Date: Fri, 25 Aug 2017 15:10:31 -0400
> From: Mike Fedkiw <mfedkiwfp at gmail.com>
> To: Chris Rendall <crendall at teamind.com>, 0 Filepro List
> <filepro-list at lists.celestial.com>
> Subject: Re: Importing/exporting data with carriage returns (I Think)
> Message-ID: <811ddc9d-6dbb-ef53-2079-6a936b9ad2f5 at gmail.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Okay, so if I remove the carriage returns before importing the data
> using xlate I'm assuming it would all just wind up as a continuous line
> of data. If that's right, is there any way of importing the data
> retaining the spacing between the data so it'll be there when exported.
> Although I've already had issues with the data not exporting after the
> first carriage return last time I tried it.
>
> Mike
>
>
> On 8/25/2017 1:58 PM, Chris Rendall via Filepro-list wrote:
>
>> You can use the XLATE command to remove the carriage return in a CSV import.
>>
>> When I use the import command I set the name to "rec": import ascii rec=/home/chris/list.csv r=\n f=,
>>
>> Then to remove the carriage return I use: rc=xlate(rec(14),chr("13"),"")
>>
>> The number 14 inside rec(14) is the number of the field you are importing. If every field has a carriage return in them you will need to use xlate for every field, rec(1), rec(2), and so on for the number of fields you are importing per record. On Linux when I'm importing a CSV file from Windows I just need to run the xlate command on the last field I'm importing.
>>
>> -- Chris
>>
>> -----Original Message-----
>> From: Mike Fedkiw via Filepro-list [mailto:filepro-list at lists.celestial.com]
>> Sent: Friday, August 25, 2017 11:33 AM
>> To: 0 Filepro List <filepro-list at lists.celestial.com>
>> Subject: Importing/exporting data with carriage returns (I Think)
>>
>> win-server 2008 r2/filepro 5.0.09dn9
>>
>> Can someone tell me how or what I can do to import data into filepro that has carriage returns within the data cells?
>>
>> I receive these nice XLS files from my vendors with extended descriptions for things that I want to get into a memo fields in filepro but I'm having all sorts of issues trying to make that happen.
>>
>> Usually after setting up the XLS file to the way it needs to be for the import I'd save it as a DXF file. That's been working just fine for quite some time but when a cell contains returns I get an error message saying it's not a valid DXF file. I also tried saving it as a CSV file and importing that but the cells with the returns didn't import at all when I tried that. And I'm not even sure I'm saving it as the correct type of CSV(Comma delimited CSV or MS-DOS CSV) for importing it.
>>
>> Even if I get the import figured out if the data does have and returns within the memo it seems to stop exporting that fields data after the first one.
>>
>> If at all possible, I would really like to maintain the returns because it makes it much easier to read the data in the memo and it would also make the exported data much nicer too read with them included.
>>
>> AND...instead of me sitting here trying to figure this out for another week or so like I just did with all the MEMO stuff, I'd just assume pay someone to set it up for me. If someone is interested in doing that, let me know.
>>
>>
>>
>> Mike
>>
>>
>>
>>
>>
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> Subscribe/Unsubscribe/Subscription Changes http://mailman.celestial.com/mailman/listinfo/filepro-list
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> Subscribe/Unsubscribe/Subscription Changes
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20170825/2c805eaa/attachment.html>
More information about the Filepro-list
mailing list