Buddy: This was exactly what I was looking for earlier this week. SHEET_INDEX was not listed as an option in the Help file for the GATEWAY EXPORT command.
I had to fiddle with your example for awhile to get it to work, though. One thing in particular was messing me up. I found that the TAB_NAME will not accept a dotted variable as an argument. Also, it has to be a literal text string with no quotes. This code works perfectly for me: SET VAR VSFTY_CW_FILE TEXT = 'D:\RBASE\DATA\SFTY_CNTS.XLS' -- DELETE .VSFTY_CW_FILE -- GATEWAY EXPORT XLSW .VSFTY_CW_FILE + SELECT &VSFTY_COLS FROM WTD_EXPT + WHERE PLANT_NAME = 'COSHOCTON' + OPTION COL_NAMES ON + |SHEET_INDEX 0 + |TAB_NAME Coshocton -- GATEWAY EXPORT XLSW .VSFTY_CW_FILE + SELECT &VSFTY_COLS FROM WTD_EXPT + WHERE PLANT_NAME = 'ZANESVILLE' + OPTION COL_NAMES ON + |SHEET_INDEX 1 + |TAB_NAME Zanesville This was a good thread. Thanks to all who contributed. Mike Ramsour AK Steel Coshocton Works From: "Walker, Buddy" <[email protected]> To: [email protected] (RBASE-L Mailing List) Date: 01/28/2011 09:33 AM Subject: [RBASE-L] - Re: Gateway Export Question Sent by: [email protected] Karen Strange I?ve always had trouble with the gateway if I didn?t first delete the file. I believe the default for SHEET_INDEX is 0 therefore calling for an overwrite. If the SHEET_INDEX is anything other than 0 it will append. Buddy From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Friday, January 28, 2011 9:05 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Gateway Export Question Buddy: Wouldn't the second gateway export simply overwrite the same filename that the first one created? I didn't think that a gateway export would append data to a file that's already out there. Could be wrong, I've never tried it. That would present a problem to me because in my code I usually don't delete the file first, and would expect every gateway export to overwrite a file that's already out there. Karen DELETE C:\TEMP\MyWorkSheet.XLS GATEWAY EXPORT XLSW C:\TEMP\MyWorkSheet.XLS + SELECT blah blah?.. OPTION BLANK_IF_ZERO ON + |SHEET_INDEX 0 + |TAB_NAME something + |COL_NAMES ON ?.. GATEWAY EXPORT XLSW C:\TEMP\MyWorkSheet.XLS + SELECT Blah Blah ?. OPTION BLANK_IF_ZERO ON + |SHEET_INDEX 1 + |TAB_NAME somethingElse + |COL_NAMES ON ?.. Notice the Sheet_INDEX option this is your key always start with 0 and continue from there. Buddy Confidentiality Notice This message is intended exclusively for the individual or entity to which it is addressed and may contain privileged, proprietary, or otherwise private information. If you are not the named addressee, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.

