It looks like you're new here. Sign in or register to get started.
codeunit 50102 GBS_CreateFile { trigger OnRun() begin end; procedure GBS_CreateTxtFile(FileName: Text) var InStr: InStream; OutStr: OutStream; tmpBlob: Record TempBlob temporary; CR: char; LF: char; begin CR := 13; LF := 10; tmpBlob.Blob.CreateOutStream(OutStr); OutStr.WriteText('First line'+ CR + LF); OutStr.WriteText('Second line'+ CR + LF); OutStr.WriteText('Third line'+ CR + LF); tmpBlob.Blob.CreateInStream(InStr); DownloadFromStream(InStr, '', '', '', FileName); end; }
Answers
Here it's an option that download a txt file with 3 lines.
Regards.