Hello all!
I am a very new user of SAS and I need a macro that would essentially take my data and output it into a latex format table in a .tex file.
I know there is an ODS destination for what I would like to achieve, but for learning purposes I want to be able to sit down with the actual code to try and understand all the pieces in the macro.
I would really appreciate any help, thank you!
Why a macro?
Do you have working code already?
There’s a ton of resources here to get you started otherwise
since you don’t want to use the ODS look at the older papers that will do it the manual way.
https://lexjansen.com/search/searchresults.php?q=Table%20to%20latex
@julesNY wrote:
Hello all!
I am a very new user of SAS and I need a macro that would essentially take my data and output it into a latex format table in a .tex file.
I know there is an ODS destination for what I would like to achieve, but for learning purposes I want to be able to sit down with the actual code to try and understand all the pieces in the macro.
I would really appreciate any help, thank you!
Thank you for replying! So I simply have a data set and I would like use a macro to take information from the dataset and create a .tex file with the same information, but now pasted into the correct text format for a latex table.
It was an exercise in a class I once took and everyone seemed to understand how to create one and I still cannot get the hang of it. So I was hoping someone with experience would already have one or could make one easily and quickly, so that I can sit and figure out all the working parts!
I'm simply using a sample dataset that I've attached below.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.