01-20-2018 05:45 AM
Hello community,
A long time ago I wrote a VBA script which streams the contents of a text file on my Google drive to a variable without creating the text file physically on my HDD. It practially sends and HTTP GET request and responseText returns the contents of the file. (see the code below). I'd like to do the same with LabVIEW but I was failed to write the code.
Pls let me know if you have a solution achiving the same functionality.
thanks.
Dim myURL As String
myURL = "https://drive.google.com/uc?export=download&id=0B-fu3XYz8TUfLXlBQzNvWEthZkk"
Dim WinHttpReq As Object
Set WinHttpReq = CreateObject("MSXML2.ServerXMLHTTP.6.0")
WinHttpReq.Open "GET", myURL, False
WinHttpReq.Send
FileContentsOnGoolgeDrive = WinHttpReq.responseText
Set WinHttpReq = Nothing
Solved! Go to Solution.
01-20-2018
02:33 PM
- last edited on
11-06-2024
05:08 PM
by
Content Cleaner
Use http get.
Your URL has a redirect link, so you would "get" it once with your original URL, parse the redirect, and "get" once more. Here's what I see if I use the redirect URL directly. 😄
01-20-2018 02:46 PM
At the end I solved it by translating the VBA script to LV, but I think its overly complicated. Your solution is better as it requires no ActiveX calls. Thanks.