BookmarkSubscribeRSS Feed
Perry
Calcite | Level 5
I am using the ODS HTML statement to create an EXCEL report with a STYLE of Minimal. I am using TITLE '' to eliminate the SAS SYSTEM header, but how do I eliminate the 2 blank rows at the top of my output EXCEL file?? I want my EXCEL report to open with the column headings in row 1...Any suggestions?? Thanks..
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
Are you by any chance still running SAS 8? There used to be a problem with the ODS HTML tags that were written that generated some extra blank lines at the top of your HTML file (these blank lines are ignored in the browser, but not in Excel), but I thought that had been fixed in SAS 9.

At any rate, you can try these other methods of creating "plain" HTML files that Excel can open:
[pre]
options nodate nonumber;
title;
ods chtml file='c:\temp\cht.xls';
ods html4 file='c:\temp\ht4.xls' style=minimal;
ods htmlcss file='c:\temp\htcs.xls' style=minimal;

proc print data=sashelp.class;
run;

ods _all_ close;

[/pre]

Note that the CHTML method of creating HTML files does not need a STYLE= option because the "compact" HTML that is generated does not contain any style information.

cynthia
Perry
Calcite | Level 5
We are running SAS 9.1.3...........
Perry
Calcite | Level 5
Thanks....I will try these options and see what happens...
Perry
Calcite | Level 5
Thanks....The ODS CHTML option worked to eliminate the 2 blank rows but now my command, /STYLE={HTMLSTYLE="VND.MS-EXCEL.NUMBERFORMAT:@"}, in my VAR statement is not working. I am using this because I have several large numeric fields which I want to load in the EXCEL file as text and not come over as exponents....Any more ideas?? Thanks for your help....

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 998 views
  • 0 likes
  • 2 in conversation