BookmarkSubscribeRSS Feed
Axel
Calcite | Level 5

I have a Stored Process in an EXCEL spreadsheet.

While EXCEL keeps the column width after refreshing, it doesn't keep the row height accordingly but always minimizes it to the lowest possible height.

How can I "tell" SAS to keep the manually configured row height?

5 REPLIES 5
Cynthia_sas
SAS Super FREQ

Hi:

  This is really a question for Tech Support. The code in your stored process will make a difference in how your question is answered. And someone will need to look at all your code and the stored process metadata to see what you mean by "keep the manually configured row height". If you're trying to use a stored process to "update" an existing formatted worksheet, you might not be able to do what you want without making some changes to your stored process.

cynthia

Axel
Calcite | Level 5

Hi Cynthia,

thanks for the answer. But I didn't get it: yes, I'm using a Stored Process. But I haven't defined any row heights there. I've just manually adjusted the row height in EXCEL and want to keep that definition after refreshing the data.

If you're saying that I have to define the row height even in my Stored Process then I'm happy to do that but therefore I'd needed the respective code!? And I've already tried some code from "STYLE=[CELLHEIGHT=166} to defining a blank line - but this all didn't work.

So what's your proposal for a code that works for EXCEL?

Cynthia_sas
SAS Super FREQ

Hi,

  I wasn't really proposing a code approach. I was proposing that you work with Tech Support. You can have an Excel sheet with a stored process get refreshed. You can also use VB to interact with the Excel sheet, as described here http://support.sas.com/resources/papers/proceedings11/012-2011.pdf -- this might be something you could do in a VB script after the stored process populates your worksheet.

cynthia

Axel
Calcite | Level 5

Hi Cynthia,

thanks for the answer. I have created a VB macro that changes the row height and it works properly.

But one more question: now I first have to refresh the data and afterwards run the macro manually.

Is it possible to let the "Refresh" Button refresh AND run the macro afterwards automatically?

sustagens
Pyrite | Level 9
This is possible but not within just AMO - you also have to use Windows Task Scheduler.

If you schedule the refresh it generates a VB script that you can then schedule using Windows Task Scheduler. If your macro is in VBA, convert it to VB script.

In Windows Task Scheduler, each scheduled task can have multiple actions, so that each action runs consecutively after the other in the other you set it up. Add each VB script as individual actions in the same task and that's it.

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
  • 5 replies
  • 5222 views
  • 3 likes
  • 3 in conversation