Home » Developer & Programmer » Forms » 'Save as' operation using winapi
'Save as' operation using winapi [message #82705] Tue, 24 June 2003 07:45 Go to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
I have to convert('Save as') .xls file to .csv file.
Here i have to do it during runtime without the user intervention.
Is there any api call to perform this?.If not is there any other way of doing so?

Thanks in Advance
~V~
Re: 'Save as' operation using winapi [message #82715 is a reply to message #82705] Thu, 26 June 2003 06:51 Go to previous messageGo to next message
magnetic
Messages: 324
Registered: January 2003
Senior Member
example of a SaveAs using ole2 in forms
this procedure is a part of a package, but i just show you that part as a possiblity for your problem.
there must be the whole code for excel interaction with oracleforms on this site.

procedure file_save(p_filename in varchar2) is
l_args ole2.list_type;
v_filename varchar2(50):=p_filename||'.csv';
begin
l_args := ole2.create_arglist;
ole2.add_arg (l_args, p_filename);
ole2.invoke (:parameter.workbook, 'SaveAs', l_args);
ole2.destroy_arglist (l_args);
ole2.invoke(:parameter.application,'Quit');
release_obj(:parameter.worksheet);
release_obj(:parameter.worksheets);
release_obj(:parameter.workbook);
release_obj(:parameter.workbooks);
release_obj(:parameter.application);
end;
Re: 'Save as' operation using winapi [message #82718 is a reply to message #82715] Thu, 26 June 2003 09:07 Go to previous message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
Thanks a lot..It is saving file as .csv file.
But it contains some junk characters.But if i do that manually(i.e choosing 'Save as' option from 'file' menu of the excel sheet) it is in proper .csv format.
But here while saving i have given file type as 'CSV(Comma delimited)(*.csv).

How to do this in the code ...i mean apply filter to the ole2 arguments list,so that it can be saved as proper comma delimited csv file.
Please guide me...
Thanks in Advance
~V~
Previous Topic: Date field Entry/Convertion in forms
Next Topic: Loading multiple images from file system
Goto Forum:
  


Current Time: Fri Apr 26 12:15:29 CDT 2024