Surfing the web via Excel: dealing with site modal window

Nelson78

Well-known Member
Joined
Sep 11, 2017
Messages
526
Office Version
  1. 2007
Hello everybody.

I'm in troubles while surfing a web site: the deadlock is the modal window you can see in the image.

https://imgur.com/a/iq4KSDY

It absolutely blocks every Excel actions: I've to manually click "OK" in order to unblock the process.

I've tried the following solution, but unsuccessfully.

(the red line is the instruction triggering the window.

Code:
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hWND As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long

Public Const BM_CLICK = &HF5&



Sub navigatewebsite()

'do stuff: login to the site and navigating

Dim i As Long, hWND As Long, childHWND As Long
'class = rgRow
Dim elements As Object
    Set elements = HTMLdoc.getElementsByClassName("rgRow")
Dim ele As Object

    For Each ele In elements
        
        If ele.innerText = "3625" Or "3626" Or "3628" Or "3630" Or _
            "3631" Or "3649" Or "3651" Or "3658" Or "6376" Or _
            "3627" Or "3650" Or "3659" Or "3652" Then

                 [COLOR="#FF0000"][B]ele.Click[/B][/COLOR]
 
                               While IE.Busy Or IE.readyState <> READYSTATE_COMPLETE     
                                DoEvents                                               
    
                                      If IE.Busy Then
                                             DoEvents
                                             hWND = FindWindow(vbNullString, "Messaggio della pagina Web")
                                                        If hWND <> 0 Then childHWND = FindWindowEx(hWND, ByVal 0&, "Button", "OK")
                                                        If childHWND <> 0 Then SendMessage childHWND, BM_CLICK, 0, 0
                                      End If
                
                               Wend

           Exit For
        End If   'end If ele.innerText
    Next ele

'do stuff

end sub

Probably the approach is wrong: may be I need to work with two Excel instances or something like that?

Thank's in advance for your suggestion.
 
Last edited:
XMLhttp, actually, is one of back-up plans.

Anyway yes, the goal is to download a .xls file selecting the options from the function in post #3 .

Prior to this, I've to perform the website login.

I'll get to work.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
In that case it might not be possible to rewrite the HTML.

What are you actually trying to do, as the final outcome? It looks like the JavaScript is downloading a .xls file, and it might be possible to bypass IE automation altogether and use XMLhttp/WinHttp to download the file, by sending the exact requests that IE would send. There are examples on the forum showing how to do this.

Staying with IE automation, another way of closing the pop-up, if you are allowed to install third-party tools, is Orlando's SendKeys.exe - http://cpap.com.br/orlando/SendKeysMore.asp. You would run it as Shell process, before the pop-up opens, so it is independent of Excel and would not be blocked.

XMLhttp, actually, is one of back-up plans.

Anyway yes, the goal is to download a .xls file selecting the options from the function in post #3 .

Prior to this, I've to perform the website login.

I'll get to work.
 
Upvote 0
In that case it might not be possible to rewrite the HTML.

What are you actually trying to do, as the final outcome? It looks like the JavaScript is downloading a .xls file, and it might be possible to bypass IE automation altogether and use XMLhttp/WinHttp to download the file, by sending the exact requests that IE would send. There are examples on the forum showing how to do this.

Staying with IE automation, another way of closing the pop-up, if you are allowed to install third-party tools, is Orlando's SendKeys.exe - http://cpap.com.br/orlando/SendKeysMore.asp. You would run it as Shell process, before the pop-up opens, so it is independent of Excel and would not be blocked.

Studying what you suggested, I've found this thread which seems the closest to my task.

https://www.mrexcel.com/forum/excel...n-internet-explorer-web-site.html#post3404965

Then, I've followed your indications about the use of Fiddler: see the post #8 of that thread, the response I've had is structured with some differences.

Can you take a look?

Code:
CONNECT bbbbbbb.ccc.com:443 HTTP/1.0
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Connection: Keep-Alive
Content-Length: 0
Host: bbbbbbb.ccc.com
Pragma: no-cache

A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.

Version: 3.1 (TLS/1.0)
Random: 5C 8F BB F9 3A F8 1C 06 92 2D 9C 84 69 11 89 A1 9C C1 69 A1 19 D1 0E 66 A2 D2 BC 72 63 63 27 A4
"Time": 09/10/2102 08:31:56
SessionID: 22 18 A4 B2 77 5D 19 96 0A E0 CE 71 DF A5 C1 1B CA 7D 6E 5E 2F A7 E3 26 FA B5 93 97 AE 35 10 2F
Extensions: 
	server_name	bbbbbbb.ccc.com
	status_request	OCSP - Implicit Responder
	elliptic_curves	secp256r1 [0x17], secp384r1 [0x18]
	ec_point_formats	uncompressed [0x0]
	extended_master_secret	empty
	renegotiation_info	00
Ciphers: 
	[C014]	TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA
	[C013]	TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA
	[0035]	TLS_RSA_AES_256_SHA
	[002F]	TLS_RSA_AES_128_SHA
	[C00A]	TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
	[C009]	TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
	[0038]	TLS_DHE_DSS_WITH_AES_256_SHA
	[0032]	TLS_DHE_DSS_WITH_AES_128_SHA
	[000A]	SSL_RSA_WITH_3DES_EDE_SHA
	[0013]	SSL_DHE_DSS_WITH_3DES_EDE_SHA
	[0005]	SSL_RSA_WITH_RC4_128_SHA
	[0004]	SSL_RSA_WITH_RC4_128_MD5

Compression: 
	[00]	NO_COMPRESSION
 
Last edited:
Upvote 0
I would expect a POST or a GET. I can't really help you further, I'm afraid.

It could be this:

Code:
POST https://bbbbbbb.ccc.com/zzzzzzz/export.aspx HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Referer: https://bbbbbbb.ccc.com/zzzzzzz/export.aspx
Accept-Language: it-IT
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: bbbbbbb.ccc.com
Content-Length: 3309
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: SMALLipServergpcdr-www-zz_999_pool=2131189770.47873.0000; APACHE_ROUTEID=.3; .ASPXAUTH=8279F05713DC913316590536D45A28926F2EA7802B0E51E8B62B82381012231E192AC773FF6B5CE852EC1DBC1FF42FB8B8B8B1202B0BED00012FCB81BA87F437C303C1536E2A70C14B0147D6CB0845DDE8044283F9ED66898C109073293315DB967DB036A89B956938A81953B580B0118F42AE0C23FA63C47BB0468BC61FC8CC29D94FE7; idlogin=7980; Administrator=; idlogintype=CbCe1%2bmhz8Q%3d; surname=bK5WMp5Bxy3HkpUXPLDEQQ%3d%3d; name=p3XVVy1bgn8%3d; logintype=EyAH69mLrBHiLTauijBTpmkCdFCkQmMD; permession=; level1=; level2=; level3=; accesslevel=%2bRMOokPN1rM%3d; company=4nooe%2f2bm%2fw%3d; level_v=OWN9c1aiwPM%3d; username=LhcV3RoYB2EGEUGp%2b8m6pw%3d%3d; mode=5U3QQE93T%2f0%3d; idGroup=uVsxn5pQ1FE%3d; Group=UCyRSUd7vmybKEwqP8W%2bAQ%3d%3d; idFlow=4pOlZ5sPbj0%3d; SMSESSION=kDYpNlrZ0f07XJPaRjeQo+Gz+K68VaFJuvmhMjFjrbPNvRYK1KvJaSdYFZ6N4s8wg7g9juxYz2wTTd3n+OF+h3+dOW9m4bnJMt2JUOhnF+MfudRa7FfzRpCmg1qw2sqp3J6aVo1DpOGKUUcTReZg6VaXheW6DPXBBBeXB8MW4qVS0yfjfEusaXic58AlpgjwToPoUlxzZsKtDzapTaKhmJLkJLVfA408MhFLaWOeTRgAtDNirzd1z0QMozvdWbbljYrVR5lEyoRlNiqfoYTxc2GCCxNWnIvu6MK/nX8u+AMeKeHz6bFItmjew5NKW8GU4RX11rPwxwSS/aFptnNsStWS7SELXSj0ePYHKIDHM/AC+PAzLsiQvd491+X92VNseywQCjROO82udLR6GFNHt1QSnoZbN4I0CyqHTF02VaPwWuIxKmA+6Ty6Mrowy7YIVaemnd656lVElKbWb8PLqx1zCgABYh02MrxBrnoXqRBAckzS2DgDz9AsZer7Ni4F7MCxcHFtNP9YEghaYyuARJnyt/bxrEIRLCm1CS52o5GKYZt+KEdvW/0Tc+LHHGDr/Ujb7+3WUTaO7mwk9prXwvq/oIYAv+1hj2gwGb9EH7lk2uuy2HojL5YO8ddxfRyouc3zPJbh58f6ZRJMEdzhIKX6ZlwgOd3PiS2ksiEut+HxgaCEkLd4N7ZTY/AdGq2cf2SSSsPexUskdGGkffSboPXfzV/ZIovpd57etALcqAhsv0hq1Re1rKy16rtty2WhJLjMPEBfzbIkur7AE7dB5zqO1bPzZvk0HBnFNuqSKODb6SVLHNOt6YqfdWXR+M9+fqpEDg1anO7qJ9csxD15CUopsK/1/NRehnSKSbl57Dq0ZQPYd7wxMVPXrNiC8BXb1mkcRjzUjmD5GIlkFP6Umv2v9cnhLutM1E+iESy/iDs+GTzquGhYPppQNzPgwes+sqx7ynwyOta4kqxGAv+Od+Siwc+Gfc8XKZdjzbFjIO1X5VlL2WxfNaP7+f44QF4axCEMYkuJhegyR+j1eB+TRGZ/YjYh00Q0gIUyWx9hX7WBWWVe0JCSLSGXxbseIgmxt9PV501wYEYqOpGu6eHjhs+pEklT2wcAutnLZOkn9H2MSglAxNALmbGGlT72vbPF547K9+zZsrAtVxaI9XccbT9u+gt0hFIIv3OUA2jVp41OHGGBYlkZaDt/6xmZSrNVTxkLqE/4zY3CRVma+ydeeHmjXqt32a+UBdM2u9AgLcEC8uIAVPIVJmXxlsQA/U4U

hidIdMarket=20&hidToExport=858873&hidP=F&RadTabStrip1_ClientState=%7B%22selectedIndexes%22%3A%5B%5D%2C%22logEntries%22%3A%5B%5D%2C%22scrollState%22%3A%7B%7D%7D&RadGrid1_ClientState=%7B%22selectedIndexes%22%3A%5B%5D%2C%22selectedCellsIndexes%22%3A%5B%5D%2C%22unselectableItemsIndexes%22%3A%5B%5D%2C%22reorderedColumns%22%3A%5B%5D%2C%22expandedItems%22%3A%5B%5D%2C%22expandedGroupItems%22%3A%5B%5D%2C%22expandedFilterItems%22%3A%5B%5D%2C%22deletedItems%22%3A%5B%5D%2C%22hidedColumns%22%3A%5B%5D%2C%22showedColumns%22%3A%5B%5D%2C%22scrolledPosition%22%3A%2216%2C0%22%2C%22popUpLocations%22%3A%7B%7D%2C%22draggedItemsIndexes%22%3A%5B%5D%7D&__EVENTTARGET=button1&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUJLTY2NDgwNTYxD2QWAgIDD2QWDAIHDw8WAh4XRW5hYmxlQWpheFNraW5SZW5kZXJpbmdoZGQCDQ9kFgICAQ9kFgJmD2QWGAIBDxYCHgVzdHlsZQUPZGlzcGxheTppbmxpbmU7ZAIFDxYCHwEFD2Rpc3BsYXk6aW5saW5lO2QCBw8WAh8BBQ9kaXNwbGF5OmlubGluZTtkAgkPFgIfAQUPZGlzcGxheTppbmxpbmU7ZAILDxYCHwEFD2Rpc3BsYXk6aW5saW5lO2QCDQ8WAh8BBQ9kaXNwbGF5OmlubGluZTtkAg8PFgIfAQUPZGlzcGxheTppbmxpbmU7ZAIRDxYCHwEFD2Rpc3BsYXk6aW5saW5lO2QCEw8WAh8BBQ9kaXNwbGF5OmlubGluZTtkAhUPFgIfAQUPZGlzcGxheTppbmxpbmU7ZAIXDxYCHwEFD2Rpc3BsYXk6aW5saW5lO2QCGQ8WAh8BBQ9kaXNwbGF5OmlubGluZTtkAg8PFgIeCWlubmVyaHRtbAUMQWNjbGFyYW1lbnRpZAITDxYCHwIFDkJSQUNDSU5JIE1BVVJPZAIVDxYCHwIFElJlZ2lzdGEgT3V0c291cmNlcmQCFw8UKwACFCsAAg8WBB8AaB4NU2VsZWN0ZWRJbmRleAL%2F%2F%2F%2F%2FD2QQFgFmFgEUKwACZGQPFgFmFgEFblRlbGVyaWsuV2ViLlVJLlJhZFRhYiwgVGVsZXJpay5XZWIuVUksIFZlcnNpb249MjAxMy4xLjIyMC4zNSwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0xMjFmYWU3ODE2NWJhM2Q0ZGQYAwUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFhIFDFJhZFRhYlN0cmlwMQULYnRuUmVmcmVzaDEFCFJhZEdyaWQxBRpSYWRHcmlkMSRjdGwwMCRjdGwwNCRjdGwwMQUaUmFkR3JpZDEkY3RsMDAkY3RsMDYkY3RsMDEFGlJhZEdyaWQxJGN0bDAwJGN0bDA4JGN0bDAxBRpSYWRHcmlkMSRjdGwwMCRjdGwxMCRjdGwwMQUaUmFkR3JpZDEkY3RsMDAkY3RsMTIkY3RsMDEFGlJhZEdyaWQxJGN0bDAwJGN0bDE0JGN0bDAxBRpSYWRHcmlkMSRjdGwwMCRjdGwxNiRjdGwwMQUaUmFkR3JpZDEkY3RsMDAkY3RsMTgkY3RsMDEFGlJhZEdyaWQxJGN0bDAwJGN0bDIwJGN0bDAxBRpSYWRHcmlkMSRjdGwwMCRjdGwyMiRjdGwwMQUaUmFkR3JpZDEkY3RsMDAkY3RsMjQkY3RsMDEFGlJhZEdyaWQxJGN0bDAwJGN0bDI2JGN0bDAxBRpSYWRHcmlkMSRjdGwwMCRjdGwyOCRjdGwwMQUaUmFkR3JpZDEkY3RsMDAkY3RsMzAkY3RsMDEFGlJhZEdyaWQxJGN0bDAwJGN0bDMyJGN0bDAxBQ5SYWRHcmlkMSRjdGwwMA8UKwADFCsAAmQXAwUGXyFEU0lDAg8FC18hSXRlbUNvdW50Ag8FCF8hUENvdW50ZBYCHgNfc2UWAh4CX2NmFCsADxQrAAIUKwABBQp0ZWVfY29kaW50FCsAAQLutTQUKwACFCsAAQUKdGVlX2NvZGludBQrAAEC77U0FCsAAhQrAAEFCnRlZV9jb2RpbnQUKwABAvC1NBQrAAIUKwABBQp0ZWVfY29kaW50FCsAAQLxtTQUKwACFCsAAQUKdGVlX2NvZGludBQrAAEC8rU0FCsAAhQrAAEFCnRlZV9jb2RpbnQUKwABAvO1NBQrAAIUKwABBQp0ZWVfY29kaW50FCsAAQL0tTQUKwACFCsAAQUKdGVlX2NvZGludBQrAAEC9bU0FCsAAhQrAAEFCnRlZV9jb2RpbnQUKwABAva1NBQrAAIUKwABBQp0ZWVfY29kaW50FCsAAQL3tTQUKwACFCsAAQUKdGVlX2NvZGludBQrAAEC%2BLU0FCsAAhQrAAEFCnRlZV9jb2RpbnQUKwABAvm1NBQrAAIUKwABBQp0ZWVfY29kaW50FCsAAQL6tTQUKwACFCsAAQUKdGVlX2NvZGludBQrAAECj7c0FCsAAhQrAAEFCnRlZV9jb2RpbnQUKwABApG3NGQFCFJhZEdyaWQxDxQrAAJkFwQFD1NlbGVjdGVkSW5kZXhlcxYABQtFZGl0SW5kZXhlcxYABRNTZWxlY3RlZENlbGxJbmRleGVzFgAFGUNsaWVudFVuc2VsZWN0YWJsZUluZGV4ZXMWAGQ1%2F%2FDf9MKhGDGJFTOgFXOtBemoLA%3D%3D&__VIEWSTATEGENERATOR=4D8B5332&__EVENTVALIDATION=%2FwEWFQKrrOnACQKYkpj1DwKYksCJCgKYkqiuCALT1KuKDQLT1NOeBwLT1PviBALT1KP3DgLT1IucDQL6oJ2vBQL6oMXDDwL6oO2HDQL6oJWcBwL6oP3ABQK1mdPYBAK1mfvsDgLD8oH9AQL%2F7qeoAQK%2BmYmSBQLRhNeHBAKs34rGBgVC6P6R7T8TPKdi5Seh542IILKs
 
Upvote 0
That could be the correct session. It has form parameters such as hidIdMarket, hidToExport, etc. and __EVENTTARGET and __VIEWSTATE, etc. These names and their values come from the form input (text, radio, checkbox, etc.) and select tags/elements in the web page. Look at the response body - does it contain the .xls file bytes?

However, it really is impossible for me to help you, for obvious reasons. I think there are enough tips and example code in the thread I linked to see the sort of things you should be looking for and coding for.
 
Upvote 0
That could be the correct session. It has form parameters such as hidIdMarket, hidToExport, etc. and __EVENTTARGET and __VIEWSTATE, etc. These names and their values come from the form input (text, radio, checkbox, etc.) and select tags/elements in the web page. Look at the response body - does it contain the .xls file bytes?

However, it really is impossible for me to help you, for obvious reasons. I think there are enough tips and example code in the thread I linked to see the sort of things you should be looking for and coding for.

I'm going back to the issue: I think to have set up in the correct way what you suggested in post number 9 of the following thread:

https://www.mrexcel.com/forum/excel...n-internet-explorer-web-site.html#post3404965


But I'm bumping into the error you set up:

Code:
[I]Error retrieving __VIEWSTATE from [url]https://bbbbbbb.ccc.com/zzzzzzz/export.aspx[/url][/I]


I suppose the reason is I've to deal with the login operation.

Analising the Fiddler, probably the point is:

Code:
POST https://zzzz.rrrr.com/siteminderagent/forms/login.fcc HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Referer: https://zzzz.rrrr.com/up-password/LoginUp-Password.jsp?TARGET2=https://zzzz.rrrr.com/up-password/login/login_redirect.html
Accept-Language: it-IT
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: zzzz.rrrr.com
Content-Length: 181
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=ty62RxNsq7OMNrxOyPbDRQYDPRKIyeOJnZzf6reGxUx_W0w-g-Ul!1966933934; BIGipServerauth-zzzzzzz-www-pr_443_pool=1476550666.47873.0000; _WL_AUTHCOOKIE_JSESSIONID=OqS-53zlUnfb.qeNf9Tx; targetappl=https://bbbbbbb.ccc.com/zzzzzzz/export.aspx; SMSESSION=rX8GzWKVjOf0DYtOYQ/CW6dRyur8IDtMw9GfDbeQfaTVCCunVazCXC+7COvLy+9SoVByUmR5X85A8Vyh7CkfcS+iFsNjjvr+IMOQdm6mIQ6GNFcxfBJi57Q4QYugi4WzCA+5dQckWQU03eef20y20O1iGl8rAa/YqRkrDPpOMpzPF5ZNHvh78EAYYhS9nx9stNNe2JzbXjet3c7VdK5TH8YD5CfU0rqmRQCCxvXpzO2jalYALOh2K6Et70+ZGuwHMF/KLdse7gz7OL84PKIeX5Q3EA8huPjT1SwLJ33uaNqHTlrhlIcKBnSI4uIDG9WgEuItNtuTOHZkdfHIbO9eE5it6J79WmhrqgvdMvLKrX6HB0k200L5cGmKBAVshHtWVRplFxb5DfVk2o9MRCu1vBkZCYmEhBv/15aAukm/QsXr3+40yI8fyXO1Yf+5k4BsqrEWs5VBpOVXuNk43FKl3eGaPzYdZEYCKOmQTe5CPFP7dgMYk+I0Q81grZYbVzV49ewqQV9agc+8MhFKczn9y6ZoNgVRZ9I6DE3VyHzDlKSbew498VQ+nMwT3tgKKkTHWYz0Vb3tcnmKOJBu1GvfFkwo9FPMgeegBzzbyXeXrvSBgBNagp2a1eGIfu0qQpGvhMKL8Jn0A6OvOTSJREGQYdiNu5Ap6qo+r/s8ezfahI3JWCsjFw+cB2KVsXVZMyXk50ge28WO+VOiGMUJKArZmZ/ZKLoWT7+kHwoV8wVzbLLC6GL91lrEij9yKXZIu1OdSSaWZQ6InnJEs8JCCgZ9G2WhTLmOK8D+I9ZBe2WXWZVVQmz/z74JejNaZUH7eMHDRvt13buY8kB6+T1kazlpl3Snxinj18iWQrt8dGVud7Zs4rlfTL90PppKKs337dOvxDuJ74cjwjccvT6IX+pk1fvIyZya4MtzHnC0BmNvKuQ0/fr0/uKPiFCTEqXcpsW62aHRrhaP7XJthsjZk6V7xDxFY0jwHAYsESVaKH+HaQf6BKBTtKLXM+pOscOiBnP37tMhSd/7JQlB51cBmEYt5i2sKh+/+ocvspEjFejWgUbWu1eLthyS0SxeaROjokh2Q3HfKyH8PJry45jnlAa0t2gSReEAB0pHmF+kF6atoFkygHLDqZMpwKKlthxg7gO5Qxo8AdiQTmo9LHA/6Fo4rSc0B1/1rmbkxSnlpWOHUDjQWpfoDmRY1i+xBCr3+h8rOTdC5nDXWraBL33Vl3sxYhkN1WeR7z/X

SMENC=UTF-8&target=%2Fup-password%2Flogin%2FHome.jsp%3FTARGET%3Dhttps%3A%2F%2Fzzzz.rrrr.com%2Fup-password%2Flogin%2Flogin_redirect.html&smauthreason=0&USER=nelson78&PASSWORD=london55
 
Last edited:
Upvote 0
That could be the correct session. It has form parameters such as hidIdMarket, hidToExport, etc. and __EVENTTARGET and __VIEWSTATE, etc. These names and their values come from the form input (text, radio, checkbox, etc.) and select tags/elements in the web page. Look at the response body - does it contain the .xls file bytes?

However, it really is impossible for me to help you, for obvious reasons. I think there are enough tips and example code in the thread I linked to see the sort of things you should be looking for and coding for.

Could this be helpful?

https://www.codeproject.com/Articles/80314/How-to-Connect-to-a-SiteMinder-Protected-Resource
 
Upvote 0
Maybe - it's doing the same as the other links in this thread - sending form data in a POST request. You could try WinHttpRequest instead of XMLhttp because the former handles cookies automatically.
 
Upvote 0
Maybe - it's doing the same as the other links in this thread - sending form data in a POST request. You could try WinHttpRequest instead of XMLhttp because the former handles cookies automatically.

Yes, maybe it does the same, but it explicitly refers to SiteMinder.

I'm giving it a try.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top