BookmarkSubscribeRSS Feed
MaheshPeesari
Calcite | Level 5

Hi All,

I have to automate a process,using ods tagset i am creating a pivot tables,after the code is run,i have to go to result viewer and clock on the tab to get excel file.can anyone of you please let me know how i can automate the proces.

I,e: after the page is loaded i want sas with HTML or Javascript to go and click the button on static page,so that there would be no necessity to manually click on the button,my file wouldbe ready after the Javascri[t code is executed.

Please give your thoughts.

Thanks,

Mahesh P

8 REPLIES 8
Cynthia_sas
SAS Super FREQ

Hi:

  You asked this question (and already got several answers and suggestions) in another forum:

https://communities.sas.com/message/134618

  One of the suggestions in that forum was that you work with Tech Support to resolve the error messages that you were experiencing. You said that you were going to contact Tech Support. I would be curious to know whether Tech Support resolved your issue with the use of the AUTO_EXCEL suboption and the errors that you were getting.

  In your prior posting, you said you were trying to use TAGSETS.TABLEEDITOR to create your pivot table? Is that still the case? Or are you using some other TAGSET template? Another reason for working with Tech Support is that if you have uncovered a problem with TAGSETS.TABLEEDITOR, then Tech Support can alert the developer that something might need to be fixed or changed.

  The only way to change the HTML code or use different JavaScript code in the TAGSETS.TABLEEDITOR output would be to modify the tagset template that creates the HTML tags + JavaScript so that different HTML and JavaScript would be generated.

  If you look in this paper:

http://support.sas.com/rnd/base/ods/templateFAQ/office91.pdf

  There is an example of using AUTO_EXCEL='Yes' and it is used with OTHER suboptions, such as UPDATE_TARGET and EXCEL_SAVE_FILE and OPEN_EXCEL. Since you have not shown any code, if you are using these options and they do not work for you, that is another reason to work with Tech Support.

  In addition, the paper that shows this code, implies that you must first create your output file and then resave the file as Excel using the techniques described in #4 on page 6 (which is listed as an ALTERNATIVE to options 1, 2 and 3 for saving your output as a "true" Excel file). But it does imply that you must first create the file. So it is possible that AUTO_EXCEL does not quite work the way you imagine. Again, Tech Support could help clarify how the AUTO_EXCEL option should be used and whether it is working as designed in your code.

cynthia

MaheshPeesari
Calcite | Level 5

Hi Cynthia,

I haven't raised any track with SAS Tech Support, i need many approvals before raising tarck to SAS tech support,so thats the reason why i have not raised any track.I am still using the same tagset and i am still working on the same issue.

I will try on UPDATE_TARGET option and check if it will be of any help.

The only problem is the file gets created but its not automated,i have to click either on activex popup or export button then the file gets created.so i thought if i can develop a code using javascript which will click the button once the page got loaded.

Thanks for all your time and support.

I will update the track if UPDATE_TARGET work's or not.

Thanks,

Mahesh P

MaheshPeesari
Calcite | Level 5

Hi Cynthia,

The only update from tech Support is ODStagsets.tableditor cannot be run in batchmode.

Thakns,

Mahesh P

Salko
Calcite | Level 5

Hi,

You can run the HTML created by tableeditor in you command (batch file).

Calling the following will run what has been requested via tableeditor as long as you have removed pop-ups and removed ActiveX warnings.

call "\\FilePath\HTMLNAME.html"

Thanks

MaheshPeesari
Calcite | Level 5

Hi Salko,

Can you tell me where exactly to put CALL stmnt,please show with an example and how could i turn of popups and ActiveX warnings.

thanks,

Mahesh P


Salko
Calcite | Level 5

Hi, A rough Example command (.cmd) File is below - (Can't provide you my Exact example as it Includes Autoexec and Config files which may confuse matters.).

The first part calls your SAS Job which included TableEditor and creates the HTML.

"start iexplore" - Opens Internet Explorer.

"PING 127.0.0.1 -n 6"  - Pauses the system for 6 seconds to allow Internet Explorer to Open

The second Call runs the HTML created by TableEditor.

If the command doesnt work then Double Click the HTML manually and follow the Instructions to remove any warning messages or pop ups.  This will involve changing your Internet Security settings.

***************** Example *****************  ;


call \\SLUK25F1\DATA\RESTRICT\SAS\Consolidation\SAS Administration\DS_TEST.sas

start iexplore

PING 127.0.0.1 -n 6

call "\\SLUK25F1\DATA\RESTRICT\SAS\Consolidation\Prod\Data\Reports\DS_TEST\SLDANNW.html"

PING 127.0.0.1 -n 6

taskkill /F /IM iexplore.exe

MaheshPeesari
Calcite | Level 5

Few things i have not understood -->

1) where does this call statements go? Does this call statements go into any shell script and then run?
2) Is it any VB code?

3) How do i have to change settings manually on UNIX server before executing the scripts,so that i dont get any popups or ActiveX warnings.

Thanks,

Mahesh P

MaheshPeesari
Calcite | Level 5

Did you get chance to create pivot tables using ods tagsets.tableeditor and in that case it creates a HTML file,when i click that it then generates pivot table,so it works only on Windows,but i want to automate this on UNIX servers,in case if you have automated such process please let me know in detail.

Thanks,

Mahesh P

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