Formatting Excel File Using Ole2 In Oracle Forms
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的更多相关文章
- 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 ...
- 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: ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- csharp:using OpenXml SDK 2.0 and ClosedXML read excel file
https://openxmlexporttoexcel.codeplex.com/ http://referencesource.microsoft.com/ 引用: using System; u ...
- 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 ...
- 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 ...
随机推荐
- zw版【转发·台湾nvp系列Delphi例程】HALCON InpaintingCt2
zw版[转发·台湾nvp系列Delphi例程]HALCON InpaintingCt2 unit Unit1;interfaceuses Windows, Messages, SysUtils, Va ...
- 【DP水题】投票问题(二)
投票问题(一) [试题描述] 欧阳文和欧阳武竞选学联主席,汪梁森负责唱票,共有m+n张,结果欧阳文获胜,已知欧阳文和欧阳武分别获得 m 张票和 n 张票(m>n).现在请你计算在唱票过程中欧阳文 ...
- Delphi 取得桌面文件夹的路径和取得我的文档的路径
Uses Windows,Registry; function GetShellFolders(strDir: string): string; const regPath = '\Software\ ...
- linux-kernel 学习计划
[资料] http://www.ibm.com/developerworks/cn/views/linux/libraryview.jsp http://www.kerneltravel.net/ [ ...
- java中length,length(),size()的区别
1. java中的length属性是针对数组说的,比如说你声明了一个数组,想知道这个数组的长度则用到了length这个属性.2. java中的length()方法是针对字符串String说的,如果想看 ...
- Install Hive
一.Hive将元数据存储在RDBMS中,有三种模式可以连接到数据: 1.single User Mode:此模式连接到一个In-memory的数据库Derby,一般用于Unit Test. 2.Mul ...
- mongodb 2.6 window 安装启动服务
安装目录:C:\Program Files\MongoDB 2.6 Standard\ 创建目录:D:\mongodb\data 通过cmd,执行如下命令: cd C:\Program Files ...
- SQLServer学习笔记<>.基础知识,一些基本命令,单表查询(null top用法,with ties附加属性,over开窗函数),排名函数
Sqlserver基础知识 (1)创建数据库 创建数据库有两种方式,手动创建和编写sql脚本创建,在这里我采用脚本的方式创建一个名称为TSQLFundamentals2008的数据库.脚本如下: ...
- PullToRefresh 下拉刷新的样式修改
资源文件结构图, 先看看下拉刷新头的布局, <?xml version="1.0" encoding="utf-8"?> <merge xml ...
- android -- 蓝牙 bluetooth (五)接电话与听音乐
1.蓝牙耳机接听电话 这个就对应HFP(Hands-freeProfile),Free your Hand,蓝牙的初衷之一.先来看这个功能的场景,手机来电,手机与蓝牙耳机已连接,这时会 ...