bumbaermail
17th January 2013, 12:33
I am creating an .xls file using seq.open() function. But I need to do "text to Column" in Excel to convert Output fields to Excel columns manually. Is the any way by which I do not have to do "Text to Column". I cannot use report because total column width is more than 255. Kindly advice
baan.kmurali
17th January 2013, 13:34
you can write the html coding in the report layout as below.
Hope this will hep you..
<HTML><HEAD>
<TITLE> Repor description </TITLE>
<body><table>
<tr><th> Order Company <th> Pre com <th> Receipt
<th> Receipt Date<th> Order
<th> Pos <th>Seq
<th> Order Date <th> Supplier
<th> Supplier Name <th> Item
<th> Description <th>Delivery QTY
<th> Buyer <th> Buyer Name <th> Warhouse
<th> PO Origin <th> PO Status</tr>
<tr><td align =left nowrap> FFF
<td align =left nowrap> FFF
<td align =left nowrap> FFFFFFF
<td align =left nowrap>FFFFFFFFFF
<td align =left nowrap> FFFFFFF
<td align =left nowrap> FFFF
<td align =left nowrap> FF
<td align =right nowrap> FFFFFFFFFF
<td align =left nowrap>FFFFFF
<td align =right nowrap>FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
<td align =left nowrap>FFFFFFFFFFFFFFFFFF
<td align =right nowrap>FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF <tr>
</table> </BODY></HTML>
mark_h
17th January 2013, 14:37
I believe if you search the code and utilities forum there is a solution posted there are creating an excel file from baan.
vahdani
17th January 2013, 16:15
Hi bumbaermail,
if you export semicolon separated fields and name give your file a csv ending instead of xls Excel can usually open it without a problem.
shah_bs
17th January 2013, 18:50
The semicolon will work o.k. in Europe - not so in other countries. For some reason, for Europe, the default delimiter is semicolon.
A better option may be to create the CSV file with TAB character as the field separator.
abattoir
17th January 2013, 21:47
As shah_bs mentioned , you can use Tab Character with XLS extension file also. It will give you output in separate columns of excel.
Below is a small piece of code for the same.
file.ret = seq.open("/tmp/Expected_Delivery_List.xls", "w+")
header.line = concat$(chr$(9) , "Supplier" , "Supplier Name" , "Expected Date" )
seq.puts(header.line , file.ret)
Thanks,
Abattoir
vahdani
17th January 2013, 21:50
Hi,
Excel used the "Windows List Separator" setting. In Germany it is set to semicolon by default.
You can see and maybe change the Windows List Separator in:
Start / Settings / Control Panel / Regional and Language Options / Customize
/ Numbers tab / List Separator field.
bumbaermail
18th January 2013, 10:05
Hello All,
Thanks you very much for your help. I must specially thank to "baan.kmurali" for the HTML Code. I have used the same and it is working very fine