04-13-2017 09:54 PM
I recently moved to environment where their outputs are mainly in excel.Some previous programmers used SAS and VBA code to create outputs.I want to know is there any benefit to learn VBA or I should move away from sas DDE/VBA code and create outputs using ODS tagsets
04-13-2017 10:02 PM
ODS Excel would be worth learning AND VBA. You will likely NEVER find a workplace without Excel, but you may end up somewhere that doesn't have SAS in the future.
For your personal skillset I suggest learning at least how to record a macro, then loop/automate it. Learning more is still a good idea.
That being said, it's still an extra step and ODS EXCEL, available as of SAS 9.4M3, is a great option for creating formatted reports.
Another reason to stay in an Excel/VBA/DDE world is that its easier to download small customizations and formatting to admin or junior staff when necessary. SAS programming is an expensive skillset that I'd rather not waste on formatting pretty reports when there are alternatives. And one more - if you ever switch to a different language the Excel and VBA portion stay the same, the SAS stuff can be changed.
04-14-2017 09:28 AM
I'm less supportive of VBA than Reeza. We work in a regulated environment and the data provenance aspects of SAS are key to reproducability and internal documentation.
The decision to learn/use VBA can also be influenced by whether your shop uses it for other work. If not, you put yourself in the position of having to support a lot of reports instead of developing new to put into production.
04-23-2017 05:57 PM
I want to pull away from VBA dependency and code mostly in SAS but as it's heavily used in the environment and people rely on it heavily some developers still develop sas/VBA codes.I want to develop new codes in sas and put into production but sometimes the templates they request might not be possible to produce in sas and might be time consuming to code in sas.
04-23-2017 09:12 PM
The SAS Add-In for Microsoft Office (SAS AMO) uses VBA as well and will allow you to already do quite a bit without VBA skills. Having such skills will help you though to further extend functionality if and as required.
Keep in mind though that using VBA and Excel formulas means that you'll never be able to run your processes fully "enterprise grade" automated server side in batch (you can automate on client side but it requires your machine to be up and running).
As for DDE: Don't use it! All the explanations here:
“Why your DDE programs don't work anymore”; http://blogs.sas.com/content/sasdummy/2014/10/14/dde-is-doa/