Form Feed New Line CR Problem

samus535

New Member
Hi everyone,
I have to export a report to a .txt file and then I should import it in Excel. When I import my file in Excel, I get some New Line, Form Feed and Cariage Return char so my function in Excel doesn't work.

Is there a way to remove those character when I generate the report ?

Thank you in advance
--Samus 535
 
Yes, but you need to be more specific about the problem.

page-size = 0 will suppress the usual header and footer and page-break behavior, which one often wants when importing to Excel. That way, one gets headers at the very top and nowhere else.

I'm not sure what your CR and LF issue is. Are you generating on Unix and importing on Windows? Is there an FTP link in between or a Samba mount? With either of these there is usually an option to map the NL only of Unix into CR NL in Windows.
 
I don't use any forms when I want to export to Excel. I use "put unformatted" with each fields separated by ";".

My issue is that in Excel, when I try to make a Sub-total, the value "001" is different than "CR LF001" so the subtotal doesn't work.

Thanks in advance
--Samus 535
 
Then I'm not getting the problem. With put unformatted, you have complete control over the output stream. If you put in SKIP, you get an OS appropriate new line and if you don't, you don't. I can see how you can have Unix vs Windows issues about what the new line should be, but not why you would get a new line at the start of a field.

The other option besides FTP and Samba are utilities like unix2dos.
 
I get CR LF at the beginning of the first field at every 55 lines. It look likes it tries to change page but I can't find why.

We are exporting the file on UNIX and we import them in Excel on Windows XP

Thanks in advance
--Samus 535
 
Perhaps you need to post some code. If you are using put unformatted, then there will be no automated form feed processing done by ABL. Indeed, with put unformatted, there won't be any automated anything in there.

Which said, the very first thing I would do is to open the file in Unix and see what is there. There is a good chance that the file is fine and the issue has to do with how you are moving it to Excel ... which is not really an ABL problem.
 
Thanks tamhas for your help. I've found what cause the problem. The problem is that when I display the put unformatted on screen, it shows in wordpad and when the user save the document it save the text and the newpage char
 
Back
Top