Below is the some useful commands of Ole2 to format excel file in Oracle Forms.

-- Change font size and name in ole2
-- Declare as cfont ole2.obj_type;
CFONT := OLE2.GET_OBJ_PROPERTY(CELL, 'Font');
OLE2.SET_PROPERTY(CFONT, 'Name','Calibri');       
OLE2.SET_PROPERTY(CFONT, 'Bold',1);  
OLE2.SET_PROPERTY(CFONT, 'Size',11);
ole2.release_obj(CFONT);
--
-- Changing number format with ole2 
OLE2.SET_PROPERTY(cell, 'NumberFormat', '00,0,0,000.00');
--
-- Changing background color in ole2
-- Declare colour ole2.obj_type;
colour:=ole2.get_obj_property(cell, 'Interior');
ole2.set_property(colour, 'ColorIndex', 33);
-- Border color
colour:=ole2.get_obj_property(cell, 'Borders');
ole2.set_property(colour, 'ColorIndex', 1);
--

-- Wrapping text in ole2
args:=OLE2.CREATE_ARGLIST; 
OLE2.ADD_ARG(args, 2);
OLE2.ADD_ARG(args, 1);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
ole2.set_property(cell, 'WrapText', 'True');
OLE2.DESTROY_ARGLIST(args);
--
-- Autofit columns in ole2
range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
OLE2.INVOKE( range_col,'AutoFit' );
OLE2.RELEASE_OBJ( range );
OLE2.RELEASE_OBJ( range_col );
--
-- Saving a excel file in ole2
args := OLE2.Create_Arglist; 
filen := 'c:\myfile.xls';
OLE2.ADD_ARG(args,filen); 
OLE2.INVOKE(workbook, 'SaveAs', args); 
OLE2.DESTROY_ARGLIST(args);
--
See also: Create Excel File in Oracle Forms http://foxinfotech.blogspot.com/2013/02/creating-excel-file-in-oracle-d2k-forms.html

Formatting Excel File Using Ole2 In Oracle Forms的更多相关文章

  1. Creating Excel File in Oracle Forms

    Below is the example to create an excel file in Oracle Forms.Pass the Sql query string to the below ...

  2. Writing Text Files On The Client in Oracle Forms 10g

    Below is the example to write file on client in Oracle Forms 10g with webutil library package.Note:  ...

  3. Freebie - Utility Form: Generate Excel Report From SQL Query In Oracle Forms 6i And 11g

    Sharing a form to generate Excel file report from SQL query in Oracle Forms. This form can be used i ...

  4. Writing Text File From A Tabular Block In Oracle Forms

    The example given below for writing text file or CSV using Text_IO package from a tabular block in O ...

  5. Changing Icon File Of Push Button At Runtime In Oracle Forms 6i

    Set Icon_File property in When-Mouse-Enter trigger Suppose you are creating icon based menu system i ...

  6. Oracle Forms 10g Tutorial Ebook Download - Oracle Forms Blog

    A step by step tutorial for Oracle Forms 10g development. This guide is helpful for freshers in Orac ...

  7. csharp:using OpenXml SDK 2.0 and ClosedXML read excel file

    https://openxmlexporttoexcel.codeplex.com/ http://referencesource.microsoft.com/ 引用: using System; u ...

  8. Giving Data Backup Option in Oracle Forms 6i

    Suppose you want to give the data backup option in Oracle Forms application to some client users, wh ...

  9. How To PLAY_SOUND in Oracle Forms

    Play_sound is used to play audio files in Oracle Forms, Play_Sound plays the sound object in the spe ...

随机推荐

  1. zw版【转发·台湾nvp系列Delphi例程】HALCON 3D Position Of Circles

    zw版[转发·台湾nvp系列Delphi例程]HALCON 3D Position Of Circles procedure TForm1.action();var ho_Image, ho_Elli ...

  2. 【linux】自定义配置debian+openbox

    openbox确实是好东西阿,小巧,不开iceweasel时内存总使用量不到200M,功能又强大,不过限于我是菜鸟,openbox再强大也有限...debian装openbox是及其简单的,不过为了使 ...

  3. Revit 二次开发 (二) 倾斜的板

    在Revit二次开发过程中,建立一个倾斜的板是可以通过如下方法进行的: // // 摘要: // Creates a slab within the project with the given ho ...

  4. js编写规范

    JavaScript编码规范 Bug----33条 1. 不要使用’==’和’!=’,使用’===’和’!==’替代 等级:Major 原因:==和!=在判断值相等前会判断类型是否相等.这容易因为类型 ...

  5. TortoiseSVN提交文件的时候卡死

    提交文件的时候卡死,查找很久,才发现原来是IP被修改了,郁闷

  6. EL表达式,JSTL:jsp standard Tag Library

    1.EL表达式的作用: 1.1访问Bean的属性.  方式一:${对象名 . 属性名} eg:${user.name}    方式二:${对象名["属性名"]} 1.2输出简单的运 ...

  7. 【python cookbook】【数据结构与算法】18.将名称映射到序列的元素中

    问题:希望通过名称来访问元素,减少结构中对位置的依赖性 解决方案:使用命名元组collections.namedtuple().它是一个工厂方法,返回的是python中标准元组类型的子类,提供给它一个 ...

  8. 关于全站https必要性http流量劫持、dns劫持等相关技术

    关于全站https必要性http流量劫持.dns劫持等相关技术 微信已经要求微信支付,申请退款功能必须12月7号之前必须使用https证书了(其他目前为建议使用https),IOS也是2017年1月1 ...

  9. Java的多线程+Socket

    客户端: package com.wulala; import java.io.FileOutputStream;import java.io.IOException;import java.io.I ...

  10. Java获取字符串编码方式

    直接下载吧: http://files.cnblogs.com/files/xiluhua/BytesEncodingDetectTool.rar