BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
mayasak
Quartz | Level 8

Hi,

I'm working on a project that needs to import data from 2 websites to MS Access on a daily basis. The data sets are exported from Access to excel and then merged into 4 datasets. The files also will be exported from Excel to SAS, cleaned, deduplicated, matched, and merged into one data set then exported back to excel.

My question - Is there any code that I can use to automate data import to SAS/ export to excel and/or any part of the data manipulation.

Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

If you can operationalize your data cleansing process then using SAS will allow for much better control and auditability than using MS Access or even worse MS Excel.

Accessing data from the Internet using SAS is possible. If and how exactly this needs to work technically "depends". If this is a public URL then I'd suggest you ask a separate question, provide the URL and show exactly what data you want to pull into SAS.

 

Data cleansing using SAS is "standard". 

Creating Excel files using SAS is "standard".

 

Using SAS will allow you to "automate" the process as long as you're able to pre-define the cleansing rules.

I believe with SAS Viya/VA there are also some interactive ways for data cleansing - but given what you shared that's not the environment you're operating in.

View solution in original post

10 REPLIES 10
Patrick
Opal | Level 21

From MS Access to MS Excel to SAS and then back to Excel? Feels like a very convoluted process. Excel is not a very good data source because it doesn't provide "stable" column definitions.
My "gut feel" is: This design requires re-assessment.

 

Questions

1. Is SAS running on the same platform (computer) than Access or Excel?

2. Do you have SAS Access to PC Files licensed

3. IF SAS runs on the same platform than Access: Would it be an option for SAS to directly read from MS Access? Or would it even be an option for SAS to pull the information directly from the website?

 

You will need to provide more information how your environment looks like for us to really provide guidance.

mayasak
Quartz | Level 8

Hi Patrick,

Thank you Patrick for the quick response. Here are my answers to your questions. 

 

Is SAS running on the same platform (computer) than Access or Excel? Yes, it is running on the same computer.

2. Do you have SAS Access to PC Files licensed. Yes, I have SAS Access to PC files licensed

3. IF SAS runs on the same platform than Access: Would it be an option for SAS to directly read from MS Access? Or would it even be an option for SAS to pull the information directly from the website?

For this, I would definitely prefer the process in the following order:

  • SAS to pull the information directly from the website but I need guidance on how to do that, if possible!
  • SAS to pull data from MS Access, but I have to do cleaning, deduplicating and merging the data in SAS. 
  • Use Excel between SAS and Access and do the cleaning and deduplication in Excel then import the data in SAS.

Thank you 

mayasak
Quartz | Level 8

Hi Kurt,

 

The websites are not public. I have no clue if it's possible to pull the data from the websites to SAS.

 

  • The first one needs my org email and a password to access. When I get the report from this website, I only have one option, MS Access to export the data.
  • The second one needs to access through a third-party user name and password and then unlock an identity code token. This website has SAS option for the export but I need to generate a "new data set" step to update the data before export.

 

Thank you

mayasak
Quartz | Level 8

Hi Kurt,

 

Yes, that's what I think is the case. So most probably the automation should be done after this step, if possible.

 

Thank you

Kurt_Bremser
Super User

With SAS/ACCESS to PC Files, you can read the .accdb file directly, and a .sas7bdat file can immediately be used, so there's no need to involve Excel at all.

mayasak
Quartz | Level 8

So, can the import from Access to SAS be automated? That is when new data are added to Access, it will be reflected automatically in SAS. The other issue is that I do a lot of data manipulation in excel, and by skipping this, I have to do all the work in SAS. Is there a way to automate this step (data cleaning, deduplicating, and merging) in SAS?

Thank you

Patrick
Opal | Level 21

If you can operationalize your data cleansing process then using SAS will allow for much better control and auditability than using MS Access or even worse MS Excel.

Accessing data from the Internet using SAS is possible. If and how exactly this needs to work technically "depends". If this is a public URL then I'd suggest you ask a separate question, provide the URL and show exactly what data you want to pull into SAS.

 

Data cleansing using SAS is "standard". 

Creating Excel files using SAS is "standard".

 

Using SAS will allow you to "automate" the process as long as you're able to pre-define the cleansing rules.

I believe with SAS Viya/VA there are also some interactive ways for data cleansing - but given what you shared that's not the environment you're operating in.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 3379 views
  • 3 likes
  • 3 in conversation