vaishali_sftdev
14th July 2010, 10:10
I am using this code:
spool.fileout=("/home/129/mig.xls")
brp_id1 = brp.open( "rlpbpm040110000", "F", 0 )

Data output in the excel file:

!&220013!-416450!4 10!: 0.0028!K 14.000!Z 0.0028"+22-01-2010"6 14.000
!&220015!-416450!4 10!: 0.0046!K 23.000!Z 0.0046"+19-01-2010"6 23.000
!&220017!-416451!4 30!: 0.2000!K 10.000!Z 0.2000"+27-01-2010"6 10.000
!&220109!-416507!4 10!: 0.0200!K 4.000!Z 0.0200"+25-06-2010"6 0.000
!&220119!-416451!4 30!: 10.0000!K 500.000!Z 10.0000"+08-07-2010"6 500.000
!&220120!-416541!4 10!: 0.5000!K 5000.000!Z 0.5000"+08-07-2010"6 10000.000
!&220121!-416545!4 10!: 2.0000!K 10000.000!Z 2.0000"+08-07-2010"6 10000.000
!&220123!-416552!4 10!: 0.0100!K 100.000!Z 0.0100"+07-07-2010"6 600.000
!&220123!-416552!4 20!: 1.2500!K 500.000!Z 1.2500"+07-07-2010"6 600.000
!&220125!-416552!4 10!: 0.0200!K 200.000!Z 0.0200"+14-07-2010"6 0.000
!&220125!-416552!4 20!: 0.2500!K 100.000!Z 0.2500"+14-07-2010"6 0.000


Please reply as soon as possible.. I am not getting what change I have to make in the code... Thanks

mark_h
14th July 2010, 15:33
You are using a baan report to write an excel file. That will not work. You will have to write your own excel driver to get the file in an excel format. There is some code in the Code and Utlities forum that might help you. Below is a little snippet of code where I create a csv file that (on our systems) launches excel.


temp.file = creat.tmp.file$(bse.tmp.dir$())
temp.file = strip$(temp.file)
newfile = seq.open(temp.file,"w")
buff = " RFQ Sequence,Item,Descriptopn,Buyer,Ord. Qty, Last Supplier, CDRS"
rc = seq.puts(buff,newfile)
endif
old.buyr = tipgc001.buyr
buff = ",=" & chr$(34) & strip$(tdexi110.item) & chr$(34) & sprintf$(" ,%s,%s,%d,=",tiitm001.dsca, tipgc001.buyr, tdexi110.oqty)
& chr$(34) & tdpur040.suno & chr$(34) & "," & newbuf & "," & rfqbuf
rc = seq.puts(buff,newfile)
rc = seq.puts(buff,totfile)