Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I create trend graphs that its data is extracted from a site?
In other words a trend graph stock over a period of 1 year'd click View Show So that relevant data is automatically extracted from a specific site, and click view my files show.
Each time you click View, implemented and updated data files and the moment of the extraction site and show it.
Please send to me if you have similar samples.
I am very grateful if someone help me in this regard.
Its my file
i write this code in the tools->edit module
Sub ws
Const HOST = "http://www.tsetmc.com/Loader.aspx?ParTree=151311&i=42354736493447489"
Const URL = "tsetmc.com"
'Create xmlhttp opject
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
'Get the selected zip code
set fld=ActiveDocument.GetField("ZipCode")
'If user has selected more than one zip code, show error, else get the Zip
if ActiveDocument.Evaluate("GetPossibleCount(ZipCode)") = 1 then
zip = ActiveDocument.Evaluate("trim(ZipCode)") ' Get selected zip
else
msgbox ("Please select only one Zip code")
exit sub
end if
'Call HTTP Get method passing WS URL and parameters
xmlhttp.open "GET", _
HOST & URL & "/GetCityForecastByZIP?ZIP=" & zip, false
xmlhttp.send ""
'Create a temporary file to save the results from WS
' Path is the folder where this qvw is
Path = ActiveDocument.Evaluate("left(DocumentPath(), index(DocumentPath(), '\', -1))")
FileName = Path & "XMLOutput.xml"
set fso = CreateObject("Scripting.FileSystemObject")
set s = fso.CreateTextFile(FileName, True)
s.writeline(xmlhttp.responseText)
s.Close()
'Load document with the temp file - DoReload will not show progress dialog
ActiveDocument.DoReload 2, true 'Fail on error, Partial Reload
'Delete the temp file
fso.DeleteFile(FileName)
end sub
Function NewDate(cntr)
'Since the webservice is returning a constant date,
'I had to use this funtion to generate dates of next 7 days
NewDate = cstr(FormatDateTime(DateAdd("d",cntr,now),2))
End Function
Its my file
i write this code in the tools->edit module
Sub ws
Const HOST = "http://www.tsetmc.com/Loader.aspx?ParTree=151311&i=42354736493447489"
Const URL = "tsetmc.com"
'Create xmlhttp opject
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
'Get the selected zip code
set fld=ActiveDocument.GetField("ZipCode")
'If user has selected more than one zip code, show error, else get the Zip
if ActiveDocument.Evaluate("GetPossibleCount(ZipCode)") = 1 then
zip = ActiveDocument.Evaluate("trim(ZipCode)") ' Get selected zip
else
msgbox ("Please select only one Zip code")
exit sub
end if
'Call HTTP Get method passing WS URL and parameters
xmlhttp.open "GET", _
HOST & URL & "/GetCityForecastByZIP?ZIP=" & zip, false
xmlhttp.send ""
'Create a temporary file to save the results from WS
' Path is the folder where this qvw is
Path = ActiveDocument.Evaluate("left(DocumentPath(), index(DocumentPath(), '\', -1))")
FileName = Path & "XMLOutput.xml"
set fso = CreateObject("Scripting.FileSystemObject")
set s = fso.CreateTextFile(FileName, True)
s.writeline(xmlhttp.responseText)
s.Close()
'Load document with the temp file - DoReload will not show progress dialog
ActiveDocument.DoReload 2, true 'Fail on error, Partial Reload
'Delete the temp file
fso.DeleteFile(FileName)
end sub
Function NewDate(cntr)
'Since the webservice is returning a constant date,
'I had to use this funtion to generate dates of next 7 days
NewDate = cstr(FormatDateTime(DateAdd("d",cntr,now),2))
End Function
Hi Frank
I want design a button that when i press it all my charts on the sheet become hidden
Have a look here: