D2k 6i and Excel file [message #462138] |
Wed, 23 June 2010 00:25 |
sureshkhalkho
Messages: 4 Registered: June 2010 Location: INDIA
|
Junior Member |
|
|
Dear All ,
I have generate a excel file through oracle developer 2000 6i
with password protect using OLE2 but autofilter,sort and format column options are not working.
Pl help
suresh
/***************
PROCEDURE UnProtectCell(r NUMBER,c NUMBER) IS
BEGIN
args:= ole2.create_arglist;
ole2.add_arg(args, NumToRange(r, c));
XLRange:= ole2.get_obj_property worksheet, 'Range', args); ole2.destroy_arglist(args);
ole2.set_property(XLRange, 'Locked', 'True');
ole2.release_obj(XLRange);
END UnProtectCell;
ArgList := ole2.create_arglist;
ole2.add_arg(ArgList, 'A:Z');
WorkColumn := ole2.Get_Obj_Property(WorkSheet, 'Columns', ArgList);
ole2.destroy_arglist(ArgList);
ole2.invoke(WorkColumn, 'AutoFit');
OLE2.RELEASE_OBJ(cell);
****************************/
|
|
|
|
Re: D2k 6i and Excel file [message #462589 is a reply to message #462559] |
Fri, 25 June 2010 02:52 |
sureshkhalkho
Messages: 4 Registered: June 2010 Location: INDIA
|
Junior Member |
|
|
Thanx for reply,
i am able to generate the excel file. But i am not able to enable autofilter,sort and format column options .
My sheet is pasword protect.
Pl help
Regards,
|
|
|
Re: D2k 6i and Excel file [message #463466 is a reply to message #462559] |
Thu, 01 July 2010 08:02 |
sureshkhalkho
Messages: 4 Registered: June 2010 Location: INDIA
|
Junior Member |
|
|
i tried both the packages DDE and OLE2, but my final result is not meeting. I want to generate a excel file with password protected with (AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowSorting:=True, AllowFiltering:=True),
So that user can do all activities (sorting, filtering , formatting etc) but can't change the data.
I tried to run the MICRO also but not successed.
Whenever i protect the sheet , all options get disable.
pl help
|
|
|
|
Re: D2k 6i and Excel file [message #465245 is a reply to message #465200] |
Tue, 13 July 2010 05:21 |
sureshkhalkho
Messages: 4 Registered: June 2010 Location: INDIA
|
Junior Member |
|
|
My problem is still pending.
I want to pass the following parameters through ole2 or DDE command with password (AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowSorting:=True, AllowFiltering:=True).
Mean my program will generate the excel file with password protect but user can do the activites like sorting, filtering, formatting etc.
I do not want to write any micro or command in excel sheet.
Pl help
Regards
|
|
|
|