@angeliquec wrote:
Hi, X Commands are disabled in our SAS server, and won't be enabled. With that, I'd like to know how can I execute a vb script I made for the consolidation of these multiple excel sheets. I know it's possible to fix the sequence using ODS tagsets, but since there is a lot of ongoing program development and revision, I prefer to perform the consolidation at the end of my SAS program.
VB Script sample as below:
Function Cpypaste (xlfile) Dim xlfile_nm xlfile_nm = xlfile 'MsgBox xlfile_nm Set CopyFromWbk = objExcel.Workbooks.Open(FolderPath & xlfile_nm & ".xlsx") 'Worksheet.Name = xlfile_nm Set ShToCopy = CopyFromWbk.Sheets(1) ShToCopy.Copy CopyToWbk.Sheets(CopyToWbk.Sheets.Count) CopyFromWbk.Close
End Function
If you are generating that output to multiple sheets from SAS then likely you could just change how the output is generated from SAS.
If using ODS tagsets.excelxp or ods excel then the SHEET_INTERVAL option controls how sheets are generated and likely use of NONE would send all of the output to a single sheet so the post processing is not needed.
... View more