SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

Click a button HTML Page

Reply
Contributor
Posts: 38

Click a button HTML Page

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

SAS Super FREQ
Posts: 8,716

Re: Click a button HTML Page

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

Contributor
Posts: 38

Re: Click a button HTML Page

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

Contributor
Posts: 38

Re: Click a button HTML Page

Hi Cynthia,

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

Thakns,

Mahesh P

New Contributor
Posts: 2

Re: Click a button HTML Page

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

Contributor
Posts: 38

Re: Click a button HTML Page

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


New Contributor
Posts: 2

Re: Click a button HTML Page

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

Contributor
Posts: 38

Re: Click a button HTML Page

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

Contributor
Posts: 38

Re: Click a button HTML Page

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

Ask a Question
Discussion stats
  • 8 replies
  • 972 views
  • 0 likes
  • 3 in conversation