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. Debian自带浏览器IceWeasel的中文化

    Iceweasel浏览器简体中文组件 # Iceweasel是Debian中Mozilla Firefox浏览器的一个再发布版#英语很菜,所以浏览器菜单也要是中文的sudo apt-get insta ...

  2. mydetails-yii1

    1.yii验证码多余的get a new code ,即使在main.php中配置了中文也是出现获取新图片,影响效果 需要把 <?php $this->widget('CCaptcha') ...

  3. ubuntu sublime-text package control

    1.ubuntu 环境下sublime-text的 package control一直配置失败 因为我下的是sublime-text3,而网上一般都是sublime-text2的教程. 2.subli ...

  4. 有图有真相——关于“视频专辑:零基础学习C语言 ”

  5. EL表达式简介

    EL表达式简介 EL 全名为Expression Language.EL主要作用: 1.获取数据 EL表达式主要用于替换JSP页面中的脚本表达式,以从各种类型的web域 中检索java对象.获取数据. ...

  6. mount源码分析 【转】

    转自:http://blog.chinaunix.net/uid-10769062-id-3230811.html Busybox- 在util-linux/mount.c的line:1609行首先映 ...

  7. iOS-网址集

    0. 在线工具 http://tool.lu 1. iOS学习笔记汇总链接 https://blog.6ag.cn/533.html 2.iOS开发内购全套图文教程http://mp.weixin.q ...

  8. 搭建HTTP Live Streaming直播系统

    最近,需要将苹果的HTTP Live Streaming系统搭建起来.完全没有头绪,故第一步就是学习. 一.学习资料 官网资料 1. http://developer.apple.com/resour ...

  9. Codeforces 746D:Green and Black Tea(乱搞)

    http://codeforces.com/contest/746/problem/D 题意:有n杯茶,a杯绿茶,b杯红茶,问怎么摆放才可以让不超过k杯茶连续摆放,如果不能就输出NO. 思路:首先,设 ...

  10. Windows驱动开发(中间层)

    Windows驱动开发 一.前言 依据<Windows内核安全与驱动开发>及MSDN等网络质料进行学习开发. 二.初步环境 1.下载安装WDK7.1.0(WinDDK\7600.16385 ...