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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.