Home » Developer & Programmer » Forms » Export data to Excel sheet using Forms (Forms [32 Bit] Version 10.1.2.0.2, Windows 7)
Export data to Excel sheet using Forms [message #618239] Wed, 09 July 2014 15:47 Go to next message
thelearner
Messages: 133
Registered: April 2013
Location: INDIA
Senior Member
Hi, I written this below code program units
....
Arglist := OLE2.Create_Arglist;
OLE2.Add_Arg (Arglist, 'c:\TEMP\test.xls');
OLE2.Invoke (workbook, 'Save', Arglist);
OLE2.Destroy_Arglist (Arglist);
...

While running the form it is opening new Excel sheet and showing the data.
My requirement is:
I want to save the excel file in Temp file. But it is not saving in particular location.

Please give any suggestions.

The Learner.
Re: Export data to Excel sheet using Forms [message #618246 is a reply to message #618239] Thu, 10 July 2014 00:17 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Instead of using save try to use "Save As" as shown in the following code, the rest I found ok.

OLE2.Invoke (workbook, 'SaveAs', Arglist);
Re: Export data to Excel sheet using Forms [message #618407 is a reply to message #618246] Fri, 11 July 2014 09:18 Go to previous messageGo to next message
thelearner
Messages: 133
Registered: April 2013
Location: INDIA
Senior Member
Hi, Sorry for the delay.
I given it as Save as. but it is not working.

OLE2.Invoke (workbook, 'Save As', Arglist);

I given the path
OLE2.Add_Arg (Arglist, 'D:\Output\'||to_char(sysdate,'dd-mon-yyyy hh24:mi:ss'));
is it correct?.
Re: Export data to Excel sheet using Forms [message #618422 is a reply to message #618407] Fri, 11 July 2014 11:22 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Azamkhan suggested "SaveAs", while you used "Save As". See the difference?
Re: Export data to Excel sheet using Forms [message #618432 is a reply to message #618422] Fri, 11 July 2014 11:51 Go to previous messageGo to next message
thelearner
Messages: 133
Registered: April 2013
Location: INDIA
Senior Member
Sorry.
Now I given like this
OLE2.Invoke (workbook, 'SaveAs', Arglist);
but it is not saving in that particular location.
Re: Export data to Excel sheet using Forms [message #618438 is a reply to message #618432] Fri, 11 July 2014 12:44 Go to previous message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Sorry, I can't assist. I never did what you are doing, I just noted the difference between suggested and applied solution. I'm afraid you'll have to wait for someone else to reply.
Previous Topic: runtime shortcut icon
Next Topic: User H tree in oracle forms 6i
Goto Forum:
  


Current Time: Sat May 18 08:34:35 CDT 2024