04-29-2014 03:57 PM
Hello. I have a project in EG 5.1, and I need send the data tables from the project to differents spreadsheets in one excel file. Is it possible?
Thanks in advanced.
04-29-2014 04:36 PM
Hi Reeza. You are OK,, (different worksheets in one workbook-one tab for each table). How can I do this?
04-29-2014 04:43 PM
How do you export a single table to a workbook right now? I ask because there's so many set ups so its easiest to see how your's is and then generalize.
05-01-2014 10:44 AM
Figure out how to do one proc export via EG and post the answer here and we can generalize from there.
The reason I can't post it for you is because each set up is so different, you could be running EG from a server rather than a desktop or have 32/64 bit or Excel can be 32/64 bit...
If the following works it may give you an idea of how to proceed.
PROC EXPORT DATA = SASHELP.CLASS
File = "C:\temp\filename.xls"
DBMS = EXCEL Replace;
SHEET= "Sample Sheet"
Or you can use tagsets.excelxp, which isn't a native excel file, but an XML file instead that opens in Excel.
ods tagsets.excelxp file="C:\temp\test.xml" style=journal options(sheet_interval='proc');
proc print data=sashelp.class;
proc print data=sashelp.cars;
ods tagsets.excelxp close;
05-01-2014 02:50 PM
I've used this to send different datasets to different tabs in one excel workbook and we have SAS EG 5.1:
LIBNAME XLS EXCEL "\\path\folder\myfile.xlsx";
Drop Table xls.tab1;
Drop Table xls.tab2;
Set tab1; *dataset created earlier in program;
Libname xls Clear;