DATA Step, Macro, Functions and more

Exporting into excel

Reply
Occasional Contributor
Posts: 12

Exporting into excel

 
Super User
Posts: 17,744

Re: Exporting into excel

Occasional Contributor
Posts: 12

Re: Exporting into excel

I need to specify the starting row like 4th row while exporting it into excel file

Super User
Posts: 17,744

Re: Exporting into excel

Well your question is still a bit vague.

 

http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export

 

Or or look at ODS EXCEL and include 4 blank titles. 

Occasional Contributor
Posts: 12

Re: Exporting into excel

I have a dataset to be exported in excel. After exporting it in excel the first row of my dataset should in 4th row of the excel file. How can it be done.

Super User
Super User
Posts: 7,392

Re: Exporting into excel

There are various fixes you can try.  @Reeza has provided one above by adding titles in for the four blank lines.  If you want variable names on the first line and data four after that then add blank rows to the dataset.  

Generally if I need to do anything in Excel - it being nothing like any proper data capture/manipulation software - I would use Excel to do it.  Export data from SAS as CSV - very simple.  Then in Excel write some VBA which opens the CSV and puts/processes the data exactly as needed in that file (note the VBA does not need to reside in the same file).  Although I would generally avoid Excel unless it was absolutely necessary.  Why do you need it to start there?  Do you have a template file or something (more reason to use VBA)?  If not then starting at A1 would seem like the most sensible method.

Ask a Question
Discussion stats
  • 5 replies
  • 251 views
  • 0 likes
  • 3 in conversation