Date: Mon, 23 Sep 2002 11:04:06 -0700
Reply-To: "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Subject: Re: excel dde v4 macro command
In-Reply-To: <7D526C31B4B34F409A2DC54FCD4508EC028300FE@anagrdexm03.resea
rch.aa.wl.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed
Philip, I think Venky is correct.
Column titles are values in the first row(s).
Row & Column Headings are the A, B, C ... (or 1, 2, 3 ... etc.) and 1, 2, 3
... and is what you'd get if you used
the "Hdng" argument of the Page.Setup command:
PAGE.SETUP(head, foot, left, right, top, bot, hdng, grid, h_cntr, v_cntr,
orient, paper_size, scale, pg_num, pg_order, bw_cells, quality,
head_margin, foot_margin, notes, draft)
Hndg corresponds to the Row & Column Headings check box. Hdng is available
only in the sheet and macro sheet form of the function.
whereas:
SET.PRINT.TITLES
Macro Sheets Only
Defines the print titles for the sheet. Use SET.PRINT.TITLES if you want
Microsoft Excel to print the titles whenever it prints any cells in a row
or column that intersect the print titles area; a cell need only share the
row or column with a print title for the title to be printed above or to
the left of that cell.
Syntax
SET.PRINT.TITLES(titles_for_cols_ref, titles_for_rows_ref)
SET.PRINT.TITLES?(titles_for_cols_ref, titles_for_rows_ref)
Titles_for_cols_ref is a reference to the row to be used as a title for
columns.
If you specify part of a row, Microsoft Excel expands the title to a full row.
If you omit titles_for_cols_ref, Microsoft Excel uses the existing
row of column titles, if any.
If you specify empty text (""), Microsoft Excel removes the row
from the print titles definition.
Titles_for_rows_ref is a reference to the column to be used as a title
for rows.
If you specify part of a column, Microsoft Excel expands the title to a
full column.
If you omit titles_for_rows_ref, Microsoft Excel uses the existing
column of row titles, if any.
If you specify empty text (""), Microsoft Excel removes the column
from the print titles definition.
Remarks
SET.PRINT.TITLES operates on the current sheet. If you specify a range that
is invalid for the current sheet, Microsoft Excel returns the #VALUE error
value.
The print titles selection can be a multiple selection. Microsoft
Excel names this selection Print_Titles when SET.PRINT.TITLES is run.
Related Functions
DEFINE.NAME Defines a name on the active worksheet or macro sheet
PRINT Prints the active sheet
SET.PRINT.AREA Defines the print area
List of Command-Equivalent Functions
At 01:44 PM 09/23/2002 -0400, Chakravarthy, Venky wrote:
>Another approach to your problem. Assuming that you create an excel template
>and then dump the data to it, you can do this in the Excel template. Under
>the file menu - "page setup" - tab to "sheets" and then fill the "rows to
>repeat at top". Note that this has to be specified in a form that is
>understood by Excel. The instruction to repeat the first 11 rows may look
>like:
>
>$1:$11
>
>This will repeat rows 1 through 11 for every excel page printed.
>
>Hope this helps.
>
>Venky
>#****************************************#
># E-mail: swovcc@hotmail.com #
># Phone: (734) 622-1963 #
>#****************************************#
>
>
>-----Original Message-----
>From: Philip Schaeffer [mailto:pschaeffer@QRC.COM]
>Sent: Monday, September 23, 2002 1:31 PM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: excel dde v4 macro command
>
>
>I would like to send a dde command to an Excel worksheet so that the column
>titles appear at the top of each printed page. Excel 4.0 Macro function
>help suggests it is the 'hdpg' arguments of the Excel 'page.setup' command
>but I cannot get it to work. My code follows.
>
>Thanks
>
>Philip E. Schaeffer
>QRC Division of ORC Macro International, Inc.
>(301) 657-3077, x221
>pschaeffer@qrc.com
>
>*******************************************
>FILENAME ddecmds
>DDE 'excel|system';
>
>DATA _NULL_;
> FILE DDECMDS;
>PUT '[OPEN
>("c:\TEMP\august.XLS")]';
>PUT '[ERROR
>(0)]';
>PUT '[FORMAT.AUTO
>(3)]';
>PUT '[PAGE.SETUP("Records for
>August",,,,,,,,,,2,5)]';
>PUT '[save
>()]';
>PUT '[CLOSE
>()]';
>PUT '[quit
>()]';
>RUN;
------------------------------------------------------------
William W. Viergever Voice : (916) 483-8398
Viergever & Associates Fax : (916) 486-1488
Sacramento, CA 95825 E-mail : wwvierg@attglobal.net
------------------------------------------------------------
|