BookmarkSubscribeRSS Feed
podarum
Quartz | Level 8

Anyone know why and how to fix when I'm exporting from SAS a large file into a .csv (or .txt) and try to pivot it in Excel it loses the ability to Sum up the data. It is still numeric data.

Sample :

2002.04,,SINGLE,,Province1

Thanks

5 REPLIES 5
Hima
Obsidian | Level 7

If I understand you correctly, this is what I have done.

data test;
input val stat $ add $;
datalines;
2002.04 SINGLE Province1
1852.04 MARRIED Province2
;
RUN;

PROC EXPORT DATA = test
OUTFILE= "C:\Documents and Settings\TEST.XLS"
            DBMS=EXCEL REPLACE;
     SHEET="Sheet1";
RUN;

Then opened the excel to creat a pivot table.

Sum of val
stataddTotal
MARRIEDProvince1852.04
SINGLEProvince2002.04
Grand Total3854.08

which is working fine

podarum
Quartz | Level 8

Yes, with 1 million records.. when I export into .csv.. then pivot works but not the SUM.  In my sample I left a ' ' where the actual number eg 345345 would be and another ' ' where 245345 would be, but in my case I have alot of spaces.. Which I think are the culprit.

Mit
Calcite | Level 5 Mit
Calcite | Level 5

What is the size of your SAS data?

So far I know if the data is larger than 2Gb then you won't be able to export it to EXCEL or Access. No matter howmany records are there.

podarum
Quartz | Level 8

It's about 63 MB's (in .csv or .txt format) and about 1 million records

art297
Opal | Level 21

I can't find it in the Microsoft documentation but, with 64 bit versions, I think that has increased to around

264

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 2037 views
  • 0 likes
  • 4 in conversation