Hi
I am trying creating an excel file with three tabs after an extract transformation.Can anyone help me with the transformation.
Thanks
Kajal
First example in the documentation covers this:
Specifically for your issue - I think your name is too long so SAS ends up truncating it - limit on worksheet name in Excel is 30 characters. The examples you've shown would fit 30 but not all would.
ods EXCEL FILE = "/home/xxxxxx/Demo1/report.xlsx"
options(sheet_interval="bygroup"
suppress_bylines="yes"
sheet_label="Report for Jan 2011"
embedded_titles="yes"
embed_titles_once="yes" );
proc report data=sashelp.cars;
by make;
run;
ods excel close;
This gets you pretty close.
@kajal_30 wrote:
I am creating a file
ods EXCEL FILE = "/user/kajal30/report.xlsx"
options (sheet_interval = 'bygroup'
sheet_label = 'origin');
proc report data=sashelp.cars;
by make;
run;
Here I need an excel sheet with multiple tabs ( each tab for diff make ) and name them as year_report_for_jan2011_honda, year_report_for_jan2011_acura, year_report_for_jan2011_tesla ........ and so on.
Hope this helps
Thanks
ODS EXCEL or PROC EXPORT are the methods for creating an Excel file. Both have examples in the documentation.
Vague questions get vague answers, if you need more assistance please provide more details.
@kajal_30 wrote:
Hi
I am trying creating an excel file with three tabs after an extract transformation.Can anyone help me with the transformation.
Thanks
Kajal
I am creating a file
ods EXCEL FILE = "/user/kajal30/report.xlsx"
options (sheet_interval = 'bygroup'
sheet_label = 'origin');
proc report data=sashelp.cars;
by make;
run;
Here I need an excel sheet with multiple tabs ( each tab for diff make ) and name them as year_report_for_jan2011_honda, year_report_for_jan2011_acura, year_report_for_jan2011_tesla ........ and so on.
Hope this helps
Thanks
First example in the documentation covers this:
Specifically for your issue - I think your name is too long so SAS ends up truncating it - limit on worksheet name in Excel is 30 characters. The examples you've shown would fit 30 but not all would.
ods EXCEL FILE = "/home/xxxxxx/Demo1/report.xlsx"
options(sheet_interval="bygroup"
suppress_bylines="yes"
sheet_label="Report for Jan 2011"
embedded_titles="yes"
embed_titles_once="yes" );
proc report data=sashelp.cars;
by make;
run;
ods excel close;
This gets you pretty close.
@kajal_30 wrote:
I am creating a file
ods EXCEL FILE = "/user/kajal30/report.xlsx"
options (sheet_interval = 'bygroup'
sheet_label = 'origin');
proc report data=sashelp.cars;
by make;
run;
Here I need an excel sheet with multiple tabs ( each tab for diff make ) and name them as year_report_for_jan2011_honda, year_report_for_jan2011_acura, year_report_for_jan2011_tesla ........ and so on.
Hope this helps
Thanks
Thank you so much
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.