BookmarkSubscribeRSS Feed
wrathstone
Calcite | Level 5

I'm very interested in using an Excel document declared as a library in order to read and write directly to certain cells for the purpose of updating specific cells as well as populating datasets. So far I've found named ranges very useful in this regard, but I've run up against the problem that assigning a named range to the contents of a table causes it to not appear in the available datasets.

 

Is there any way in SAS to read from an Excel cell range that has been formatted as a table? As a named range or otherwise?

 

Also, if there's a way to read from an Excel file while it's still open that would be really cool. Despite there being a readonly option it seems the libname statement still requires a file lock.

1 REPLY 1
tomrvincent
Rhodochrosite | Level 12
I read in the entire worksheet with getnames=n and then I can manipulate/test cells as I see fit.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Discussion stats
  • 1 reply
  • 1181 views
  • 0 likes
  • 2 in conversation