Code would useful to create a .txt file thru App Engine

Your rating: None Average: 5 (3 votes)

Write the code in PeopleCode Action:
Local File &MYFILE;
&PS_SERVDIR = (GetEnv("PS_SERVDIR")) | "/";
&FPath = &PS_SERVDIR | "file.txt";
&MYFILE = GetFile(&FPath, "W", %FilePath_Absolute);
&MYFILE.WriteLine(&Input);

&MYFILE.Close();

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
Guest's picture
Guest
Re: Code would useful to create a .txt file thru App Engine

I have created a text file using file layout and application engine. The file is opening properly in notepad++ and excel but when opened with notepad all rows are coming in a single line. The third party is not able to load the file they are complied new line character is not available after each row. Is there any property that I need to set in File layout/Peoplecode for this?

Thanks Advance
Sri

Post new comment

CAPTCHA
The question below is to prevent automated spam submissions.
3 + 5 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.