BookmarkSubscribeRSS Feed
lloraine
Calcite | Level 5
I am trying to create an Excel file using ODS. My file contains 67647 rows. My Excel file is truncated at 65536 rows. Is there anyway to make the overflow go to the next tab in Excel??
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
Two easy things to do are
1) use FIRSTOBS= and OBS= to split up the data using TAGSETS.EXCELXP to create the multiple sheets (you could even "macroize" whether the data needed to be split up or not, but the program below shows a simple example, not a macroized one).
OR
2) use BY group processing to break the data into logical groups -- TAGSETS.EXCELXP will put every group into a separate sheet, by default. (of course, this assumes that no single by group is larger than the 65K limit)

cynthia
[pre]
**1) use FIRSTOBS= and OBS=;
ods tagsets.excelxp file='c:\temp\split_file.xls';

proc print data=sashelp.class(firstobs=1 obs=7);
run;

proc print data=sashelp.class(firstobs=8 obs=19);
run;

ods tagsets.excelxp close;



**2) Split into BY groups;
ods tagsets.excelxp file='c:\temp\split_by.xls';

proc print data=sashelp.shoes;
where region in ('Asia', 'Canada', 'Pacific');
by region;
var region subsidiary product sales;
run;

ods tagsets.excelxp close;
[/pre]
lloraine
Calcite | Level 5
If I use the following code to export into ACCESS is there any problem with the number of rows of data?

PROC EXPORT DATA = PS_CLASS_TBL
OUTTABLE = "PS_CLASS_TBL"
DBMS = ACCESS REPLACE;
DATABASE = "C:\CRSE_FACULTY_GRADUATE.MDB";
QUIT;
Cynthia_sas
SAS Super FREQ
Hi:
I don't know the exact answer to that. According to this site:
http://office.microsoft.com/en-us/access/HA100307391033.aspx
the limit for Microsoft Access tables is based on overall file size, not number of rows. (no more than 255 fields in the table with an overall file size of 2 gigabytes, minus the space needed for system objects).

You may want to run a test or double check with Tech Support on this one.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 683 views
  • 0 likes
  • 2 in conversation