Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Background color of the cell in EXCEL not working....Pls help..

user541642May 14 2007 — edited Jul 22 2008
Hi gurus,

I have written a procedure to change the background color of the cell in EXCEL.The code is as below..


PROCEDURE set_header (p_row IN NUMBER, p_col IN NUMBER, p_value IN VARCHAR2, p_border IN VARCHAR2 DEFAULT 'N',p_bgcolor IN VARCHAR2 DEFAULT 'N') IS

BEGIN
v_args := ole2.create_arglist;
ole2.add_arg(v_args, p_row);
ole2.add_arg(v_args, p_col);
v_cell := ole2.get_obj_property(v_worksheet, 'cells', v_args);
v_font := ole2.get_obj_property(v_cell, 'font');
ole2.set_property(v_font, 'fontstyle', 'bold');
ole2.set_property(v_font, 'size', 9);
ole2.destroy_arglist(v_args);
if p_border = 'Y' THEN
v_border := ole2.get_obj_property(v_cell, 'Borders');
ole2.set_property(v_border, 'LineStyle', 1);
ole2.release_obj(v_border);
End If;


if p_bgcolor ='Y' THEN
v_bgcolor := ole2.get_obj_property(v_cell,'Bgcolor'); --This is not woking
ole2.set_property(v_bgcolor,'bgcolor','red');
ole2.release_obj(v_bgcolor);
End If;
ole2.set_property(v_cell, 'value', p_value);
ole2.release_obj(v_cell);
END set_header;


Pls tell me how to change the backcolor and forecolor in the cell...

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2008
Added on May 14 2007
5 comments
3,799 views