Thanks very much Razzak. You always seem to have a solution - good to see
that you are making the software do the 'thinking'. 

Regards,
 
John Docherty


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak
Memon
Sent: Friday, 12 June 2009 2:37 p.m.
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: gateway export and Specification_file_name

At 06:34 AM 6/11/2009, John Docherty wrote:

>I note that Excel 2007 gives me a warning about the file format
>when opening the file, but it certainly appears to be OK.


John,

That is the result of file being saved with ".xls" extension.
However, if you save the file with ".xlsx" extension, Excel
2007 will not generate that initial -ERROR- when opening the
file.

Having said that, to automate the entire process of generating
spreadsheets via R:BASE, using the GATEWAY EXPORT with OPTION
SPECIFICATION_FILE_NAME, you can use RRegistry.RBL Plugin to
find the appropriate file extension (.xls or .xlsx).

Here's how:

-- Example
-- Start here ...
IF (CVAL('DATABASE')) <> 'RRBYW14' OR +
    (CVAL('DATABASE')) IS NULL THEN
    CONNECT RRBYW14 IDENTIFIED BY NONE
ENDIF
-- Find the default file extension and version of MS Excel
-- installed (.xlsx for MS Office Excel 2007)
CLS
PLUGIN RRegistry.RBL 'vCheckExtension|CHECK_KEY|HKCR|.xlsx|'
IF vCheckExtension = 'TRUE' THEN
    -- Create XLSX Worksheet for MS Excel 2007
    GATEWAY EXPORT XLSW Customer.XLSX +
    SELECT * FROM Customer ORDER BY Company +
    OPTION SPECIFICATION_FILE_NAME Customer.rgw +
    |SHEET_NAME Customers +
    |ACTION OPENVIEW
ELSE
    -- Create XLS Worksheet for older MS Excel
    GATEWAY EXPORT XLSW Customer.XLS +
    SELECT * FROM Customer ORDER BY Company +
    OPTION SPECIFICATION_FILE_NAME Customer.rgw +
    |SHEET_NAME Customers +
    |ACTION OPENVIEW
ENDIF
CLEAR VARIABLE vCheckExtension
RETURN
-- End here ...

That is your tip of the day!

Very Best R:egards,

Razzak.

--- RBASE-L
=======================3D=======================3
D=
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
=======================3D=======================3
D=
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
=======================3D=======================3
D=
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
=======================3D=======================3
D=
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
=======================3D=======================3
D=


Reply via email to