Wednesday, March 30, 2011

Tip of the Day: Defining Header/Footer when Using GATEWAY EXPORT XLSW
Section: Un-Documented Features
Version: R:BASE eXtreme 9.1 (32/64)
Build..: 9.1.2.10214 and higher

When automating GATEWAY EXPORT XLSW options, did you know that you
can also include Header and Footer text?

Two additional OPTIONs are implemented when exporting data as XLSW.

HEADER_TEXT value
FOOTER_TEXT value

-- Example 01:

-- Start here
   CONNECT RRBYW17
   SET ERROR MESSAGE 2077 OFF
   DELETE InvoiceHeader.xls
   SET ERROR MESSAGE 2077 ON
   GATEWAY EXPORT XLSW InvoiceHeader.xls +
   SELECT TransID AS `Invoice No`, +
   TransDate AS `Invoice Date`, +
   NetAmount AS `Sub Total`, +
   Freight, Tax, +
   InvoiceTotal AS `Invoice Total` +
   FROM InvoiceHeader ORDER BY TransID +
   OPTION COL_NAMES ON +
   |HEADER_TEXT Customer Invoices +
   |FOOTER_TEXT Quarterly Report +
   |SHEET_NAME Invoices +
   |ACTION OPENVIEW
   RETURN
-- End here

Note:

. You can customize the column names with spaces by surrounding the names
  with IDQUOTE character.

. Once the worksheet is opened, notice the header information in Row 1,
  Cell 1 (A1), and the footer information in the last row, Cell 1.

. You may also notice the "Number Format" for Invoice No, Invoice Date,
  Net Amount, Freight, Tax, and Invoice Total. All data types, such as
  INTEGER (Number), DATE, and CURRENCY are now reflected accordingly
  and not formatted as custom.

. You may also customize and automate the file extension (.xls or .xlsx)
  by using the PLUGIN RRegistry Command.

Have fun!

Very Best R:egards,

Razzak.

P.S. Stay tuned for more ...

--- RBASE-L
================================================
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)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
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.
================================================


Reply via email to