Hello,
It is possible to export several dataports to one file? I mean append lines of text at the end of existing file.
Pleas help, I really need this.
Actually Adding Text at the end of an already existing text file IS POSSIBLE.
I haven't looked into it in depth, but We use Lanhams EDI module. And when I EXPORT a sales order to a text file, if I don't delete the previous text file then the two outputs are combined.
I think this happens in the Sales order Export Codeunit 14000354.
Possibly in the OpenEDIFile Trigger.
I believe it opens the file uses the Functions SEEK & TRUNC to find the file length & start writing at that point. There seems to be alot of
BegPos (Beginning Position) &
BeginFileLength going on :whistle:
Perhaps one of the Mega Gurus can look into the basics of how it is done - it would make a good tip n trick.
If excel format helps then you can use the update functionality of export to excel as used in analysis by dimension. Here you can specify the excel file and the sheet number to transfer the data.
Try DOS feature type >> file.ext
1) export to first txt
2) export to second txt
3) append contents of second txt into first txt
type second.txt >> first.txt
Result will be contents of first.txt plus second.txt in file first.txt.
If you'd like to add separator (new line), create i.e. NLCR.txt with single <LF><CR> and then
type nlcr.txt >> first.txt
type second.txt >> first.txt
Comments
What you can do is to make two files and write some procedure to merge them.
I haven't looked into it in depth, but We use Lanhams EDI module. And when I EXPORT a sales order to a text file, if I don't delete the previous text file then the two outputs are combined.
I think this happens in the Sales order Export Codeunit 14000354.
Possibly in the OpenEDIFile Trigger.
I believe it opens the file uses the Functions SEEK & TRUNC to find the file length & start writing at that point. There seems to be alot of
BegPos (Beginning Position) &
BeginFileLength going on :whistle:
Perhaps one of the Mega Gurus can look into the basics of how it is done - it would make a good tip n trick.
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://ssdynamics.co.in
1) export to first txt
2) export to second txt
3) append contents of second txt into first txt
Result will be contents of first.txt plus second.txt in file first.txt.
If you'd like to add separator (new line), create i.e. NLCR.txt with single <LF><CR> and then
copy file1.txt+file2.txt+file3.txt file4.txt
the three files will be concatenated into file4.txt. That way you only need on command line.
This posting is provided "AS IS" with no warranties, and confers no rights