BookmarkSubscribeRSS Feed
varun45
Calcite | Level 5

Is there a macro to find the last refreshed time of the excel sheet?

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

??  SAS Macros are not Excel macros.  So no, there is no SAS Macro to find something from another application.  You perhaps want to consult an Excel forum, e.g.

https://www.mrexcel.com/forum/excel-questions/106612-display-date-when-data-last-refreshed-external-...

 

Then save that refresh date in the date so you can read it in.

varun45
Calcite | Level 5
Hi,

Sorry,I am very new to this. Actually I am using excel with SAS add-in. I wanted to know the macro to find out the last refreshed time of the sheet. Can You help me in this?


Kurt_Bremser
Super User

Use the right tool (Maxim 14), which is VBA, the dedicated programming environment for MS Office. I don't know if SAS could retrieve that date in any way through dictionary.tables when a library is assigned to the Excel workbook.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

I am afraid I don't use that.  What I would say is that is just a tool to pull data from a dataset, so its how that pull is done, and recording the datetime of that, e.g:

http://support.sas.com/kb/40/982.html

 

It would need to be stored in the datafile to be accessible, wouldn't think there is a property for that, but as I say I don't use.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 4 replies
  • 1449 views
  • 0 likes
  • 3 in conversation