Portable Subfile
Rob Kool
rob.kool@cdp.co.nz
Fri, 15 Sep 2000 09:16:36 +1200
I also use QTP a lot to create files for either Word or Excel.
Most of the time I create a | (pipe) delimited file well over 256 characters
I use something like the following on a (SCO)Unix box.:
.....
Define D_CR Int*1 = 13
Define D_LF Int*1 = 10
Define D_CRLF Char*2 = Char(D_CR) + Char(D_LF)
Define D_DELIM Char*1 = "|"
Define D_RECORD_PRE Char*298 &
= Trunc(TXT_FIELD_1) &
+ D_DELIM &
+ Accii(NUM_FIELD_2,4) &
+ D_DELIM &
+ Trunc(TXT_FIELD_3) &
+ D_DELIM &
.
.
.
+ D_DELIM &
+ Trunc(TXT_FIELD_N)
;Add the CRLF to the end of the record.
Define D_RECORD Char*300 &
= D_RECORD_PRE[1:298] + D_CRLF
;No need for a portable subfile. Just import the *.SF
;bit into Excel.
Subfile TO_EXCEL &
Keep &
Include D_RECORD
.....
The pipe delimited file is easily imported in Excel or used in Word.
Rob Kool
CDP Ltd.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.