Re: 'Save as' operation using winapi in oracle forms

From: Marino Ljubic <mljubic_at_globalnet.hr>
Date: Mon, 30 Jun 2003 09:13:45 +0200
Message-ID: <bdoo66$6jen$1_at_as201.hinet.hr>


"Manikandan" <member12054_at_dbforums.com> wrote in message news:3056517.1056946383_at_dbforums.com...
>
> Hi,
> I am using the following code.But i am able to save the file with .csv
> extension.But if i open the file it contains some control characters.
>
> args:=ole2.create_arglist;
> ole2.add_arg(args,'C:\Ora.csv');
> ole2.invoke(workbook,'SaveAs',args);
> ole2.destroy_arglist(args);
>
> Here i think i should specify format string.So how should and
> where should i pass the format string(i.e file filter) to
> ole2.Please guide me.

Simply add the second argument:

args:=ole2.create_arglist;

ole2.add_arg(args,'C:\Ora.csv');
ole2.add_arg(args, 6);
ole2.invoke(workbook,'SaveAs',args);
ole2.destroy_arglist(args);

But maybe your problem is in CSV file format limitations. Read the following text copied from Excel Help:

The CSV (Comma delimited) file format saves only the text and values as they are displayed in cells of the active worksheet. All rows and all characters in each cell are saved. Columns of data are separated by commas, and each row of data ends in a carriage return. If a cell contains a comma, the cell contents are enclosed in double quotation marks.

If cells display formulas instead of formula values, the formulas are converted as text. All formatting, graphics, objects, and other worksheet contents are lost.

Note If your workbook contains special font characters such as a copyright symbol (C), and you will be using the converted text file on a computer with a different operating system, save the workbook in the text file format appropriate for that system. For example, if you are using Windows and want to use the text file on a Macintosh computer, save the file in the CSV (Macintosh) format. If you are using a Macintosh computer and want to use the text file on a system running Windows or Windows NT, save the file in the CSV (Windows) format. Received on Mon Jun 30 2003 - 09:13:45 CEST

Original text of this message