Using Text_io Can i make a character as bold...
KINGFeb 12 2007 — edited Feb 13 2007Hi All,
i am using text_io and i would like to make show my headings in bold while opening them in excel. can any 1 help...here is a sample of my code
i would like the code below to be in bold when moving to excel?
text_io.put_line(in_file, 'Site Abbr'||' '||'Designation'||' '||'Eqp Type Descr'||' '||'Eqp Type MFR'||' '||'Eqp Type Model'||
' '||'Ser No'||' '||'Sware Versn'||' '||'Stat CD'||' '||'Inv No'||' '||'PO No'||
' '||'Line No'||' '||'Suite'||' '||'Bay'||' '||'Panel'||' '||'Last updt dt'||' '||'Last updt user');
text_io.put_line(in_file, ' ');
Begin
in_file := text_io.fopen('c:\temp\excel_file.xls', 'W');
text_io.put_line(in_file, 'Site Abbr'||' '||'Designation'||' '||'Eqp Type Descr'||' '||'Eqp Type MFR'||' '||'Eqp Type Model'||
' '||'Ser No'||' '||'Sware Versn'||' '||'Stat CD'||' '||'Inv No'||' '||'PO No'||
' '||'Line No'||' '||'Suite'||' '||'Bay'||' '||'Panel'||' '||'Last updt dt'||' '||'Last updt user');
text_io.put_line(in_file, ' ');
--------------------------------------------------
For i in c1 loop
text_io.put(in_file, i.site_abbr||' '||' '||i.designation||' '|| i.EQP_TYPE_DESCR||' '||i.EQP_TYPE_MFR||' '||i.EQP_TYPE_MODEL
||' '||i.SER_NO||' '||i.SWARE_VERSN||' '||i.STAT_CD||' '||i.INV_NO||' '||i.PO_NO||' '||
i.LINE_NO||' '||i.SUITE||' '||i.BAY||' '||i.PANEL||' '||i.LAST_UPDT_USER||' '||i.LAST_UPDT_USER);
Text_IO.New_Line (in_file, 1);
End loop;
If text_io.is_open(in_file) then
text_io.fclose(in_file);
End if;
--HOST('echo "C:\Program Files\Microsoft Office\Office\EXCEL.EXE" /r ' );
--OLE2.SET_PROPERTY('C:\temp\excel_file.xls', 'Bold', TRUE);
HOST('C:\Program Files\Microsoft Office\Office\EXCEL.EXE C:\temp\excel_file.xls' );
--HOST('C:\Program Files\Microsoft Office\Office\EXCEL.EXE '||OLE2.SET_PROPERTY('C:\temp\excel_file.xls', 'Bold', TRUE));
END;