Prev: 2 ways to import count data but get different results from
Next: Unneecessary quotes in proc format (was: Can't format names
From: B.Abbey on 28 Dec 2009 21:12 I am attempting to export my regression results to an excel file. I have used the following code I obtained from the SAS site: ods tagsets.excelxp file="Excelxp.xls"; proc reg data = final.regression_trades; model result = return_cost holdtime_mins; run; quit; ods tagsets.excelxp close; I have also tried: ODS TAGSETS.EXCELXP file='C:\regression.xls'; ods tagsets.excelxp file="Excelxp.xls"; proc reg data = final.regression_trades; model result = return_cost holdtime_mins; run; quit; ods tagsets.excelxp close; I can view the regression results in SAS but I get an error when opening the excel file. Excel states the errors arise due to the style and table.
From: Arthur Tabachneck on 28 Dec 2009 22:42 Do you get what you want if you use:? ods tagsets.msoffice2k file="Excelxp.xls"; proc reg data = final.regression_trades; model result = return_cost holdtime_mins; run; quit; ods tagsets.excelxp close; Art ------------- On Dec 28, 9:12 pm, "B.Abbey" <Abbe...(a)aol.com> wrote: > I am attempting to export my regression results to an excel file. I > have used the following code I obtained from the SAS site: > > ods tagsets.excelxp file="Excelxp.xls"; > proc reg data = final.regression_trades; > model result = return_cost holdtime_mins; > run; > quit; > > ods tagsets.excelxp close; > > I have also tried: > > ODS TAGSETS.EXCELXP > file='C:\regression.xls'; > > ods tagsets.excelxp file="Excelxp.xls"; > proc reg data = final.regression_trades; > model result = return_cost holdtime_mins; > run; > quit; > > ods tagsets.excelxp close; > > I can view the regression results in SAS but I get an error when > opening the excel file. Excel states the errors arise due to the > style and table.
From: Arthur Tabachneck on 28 Dec 2009 22:44 Slight correction: ods tagsets.msoffice2k file="Excelxp.xls"; proc reg data = final.regression_trades; model result = return_cost holdtime_mins; run; quit; ods tagsets.msoffice2k close; HTH, Art --------- On Mon, 28 Dec 2009 19:42:12 -0800, Arthur Tabachneck <art297(a)NETSCAPE.NET> wrote: >Do you get what you want if you use:? > > ods tagsets.msoffice2k file="Excelxp.xls"; > proc reg data = final.regression_trades; > model result = return_cost holdtime_mins; > run; >quit; > >ods tagsets.excelxp close; > >Art >------------- >On Dec 28, 9:12 pm, "B.Abbey" <Abbe...(a)aol.com> wrote: >> I am attempting to export my regression results to an excel file. I >> have used the following code I obtained from the SAS site: >> >> ods tagsets.excelxp file="Excelxp.xls"; >> proc reg data = final.regression_trades; >> model result = return_cost holdtime_mins; >> run; >> quit; >> >> ods tagsets.excelxp close; >> >> I have also tried: >> >> ODS TAGSETS.EXCELXP >> file='C:\regression.xls'; >> >> ods tagsets.excelxp file="Excelxp.xls"; >> proc reg data = final.regression_trades; >> model result = return_cost holdtime_mins; >> run; >> quit; >> >> ods tagsets.excelxp close; >> >> I can view the regression results in SAS but I get an error when >> opening the excel file. Excel states the errors arise due to the >> style and table.
From: Sierra Information Services on 28 Dec 2009 23:18 I just tried this using my own data source (since I don't have access to YOUR data), and had no problems opening the XLS-readable file generated by the ExcelXP tagset with the results created by PROC REG. Here are some suggestions: 1) make sure you are using Excel tagset version 1.86 or higher (there is a note in the SAS log that tells you which tagset version is being used). 2) Just to be careful, are you using SAS 9.1 or higher? 3) The Excel XP tagset uses the default ODS style template, well, by default. Your code does not indicate you are trying to use any other style template, but that should not matter, as the tagset is set up to use any ODS style. Can you reply back with the text of the message you are receiving from Excel? Andrew Karp Sierra Information Services http://www.sierrainformation.com On Dec 28, 6:12�pm, "B.Abbey" <Abbe...(a)aol.com> wrote: > I am attempting to export my regression results to an excel file. �I > have used the following code I obtained from the SAS site: > > ods tagsets.excelxp file="Excelxp.xls"; > � � proc reg data = final.regression_trades; > � � � model result = return_cost holdtime_mins; > � � run; > quit; > > ods tagsets.excelxp close; > > I have also tried: > > � � ODS TAGSETS.EXCELXP > � � file='C:\regression.xls'; > > ods tagsets.excelxp file="Excelxp.xls"; > � � proc reg data = final.regression_trades; > � � � model result = return_cost holdtime_mins; > � � run; > quit; > > ods tagsets.excelxp close; > > I can view the regression results in SAS but I get an error when > opening the excel file. �Excel states the errors arise due to the > style and table.
From: B.Abbey on 29 Dec 2009 11:21
Art's version worked perfectly. Andrew, I am using SAS 9.2 (on this computer - I was using another computer yesterday also with 9.2). On this computer I checked he tagset and I am using: (SAS 9.1.3, v1.75, 07/26/07). I did not get the error I received yesterday on the other computer but the original code I posted will not work on this system either. I will obtain the new tagset. I am currently on my desktop at work and my laptop has SAS installed (and that was the one that gave me the error message). I will post a screenshot of the error when I get home tonight. FYI I did see another post in this forum that states that the export to Excel will not work in windows x64 platforms. I have 64 bit Vista on this computer and XP Professional on the laptop. Boris |