Home » Developer & Programmer » Forms » Export forms into excel to a specified xls file? (Oracle 9i,form 6i)
Export forms into excel to a specified xls file? [message #384298] Tue, 03 February 2009 03:14 Go to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Hi,
I want to Export form detail into specified xls file and specified worksheet, is there any possible please guide me.

Kanish
Re: Export forms into excel to a specified xls file? [message #384460 is a reply to message #384298] Tue, 03 February 2009 23:24 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'excel'.

David
Re: Export forms into excel to a specified xls file? [message #384738 is a reply to message #384298] Thu, 05 February 2009 00:30 Go to previous messageGo to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Hi
As per instruction i done search and got solution. As per the lead i have done below coding but i got the error

Code

PROCEDURE FormToExcel IS

r number := 2;
c number := 1;

i_orientation VARCHAR2(200) := '1';
i number :=1;

/* definiton for commonly used variables and constants and exceptions */
ExcelID ole2.obj_type;
ExcelWorkBooksID ole2.obj_type;
ExcelWorkBookID ole2.obj_type;
--ExcelWorkSheetsID ole2.obj_type;
ExcelWorkSheetID ole2.obj_type;
ExcelCellID ole2.obj_type;
ExcelFontID ole2.obj_type;
ExcelPageSetupID ole2.obj_type;
ExcelArgs ole2.list_type;

BEGIN

ExcelID := ole2.create_obj('Excel.Application');
ExcelWorkBooksID := ole2.get_obj_property(ExcelID, 'Workbooks');

--Open exicisting file
ExcelArgs := ole2.create_arglist;
ole2.add_arg(ExcelArgs,'C:Salary.xls');
ExcelWorkbookID := ole2.invoke_obj(ExcelWorkBooksID,'Open',ExcelArgs);
ole2.destroy_arglist(ExcelArgs);

--Open excisting worksheet
ExcelArgs := ole2.create_arglist;
ole2.add_arg(ExcelArgs,'Grosss');
ExcelWorkSheetID := ole2.invoke_obj(ExcelWorkbookID,'Worksheets',ExcelArgs);
ole2.destroy_arglist(ExcelArgs);



Error getting when try to open ExcelworkbookId statement

Frm-40735:When-button-pressed trigger raised unhandled exception ora-305500


please guide me solve this issue.

kanish
Re: Export forms into excel to a specified xls file? [message #384747 is a reply to message #384738] Thu, 05 February 2009 00:53 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Place 'message; pause;' pairs between each line of code and determine EXACTLY which line is causing the problem.

David
Re: Export forms into excel to a specified xls file? [message #384756 is a reply to message #384298] Thu, 05 February 2009 01:08 Go to previous message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

When executing the below statement

ExcelWorkbookID := ole2.invoke_obj(ExcelWorkBooksID,'Open',ExcelArgs);


The above points is Cleared
when I give c:\salary.xls

Now the same issue arise this point

ExcelWorkSheetID := ole2.invoke_obj(ExcelWorkbookID,'Worksheets',ExcelArgs);


kanish

[Updated on: Thu, 05 February 2009 02:09]

Report message to a moderator

Previous Topic: how to set push button iconic
Next Topic: how to create an XP button shape in forms 6i or forms 10g?
Goto Forum:
  


Current Time: Thu Dec 08 04:10:06 CST 2016

Total time taken to generate the page: 0.11480 seconds