LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read .cvs from web server?

Solved!
Go to solution

Hello,

I assumed this would be easy but I'm not having any luck here.. I'd like to create a VI to read each of the .cvs file located on a local web server (see imagesfor more detail).  Any suggections?

 

Thank You

Pete

 

 

Download All
0 Kudos
Message 1 of 8
(3,212 Views)

What have you tried?

 

You should be able to open a file on the server.  What have you entered as your file path?

0 Kudos
Message 2 of 8
(3,208 Views)

At the most basic level, I tried simply a Read speadsheet file.  See attached image..   

read.JPG

'

I can paste that same path in the Open dialog of excel and the data loads perfectly..

0 Kudos
Message 3 of 8
(3,204 Views)

http:\\ shouldn't be part of the file path.

 

Try \\10.201.76.20\rest of the path.................

 

 

0 Kudos
Message 4 of 8
(3,193 Views)

Still no luckpath.JPG

0 Kudos
Message 5 of 8
(3,170 Views)

Different error.

 

Are you sure that file exists?

 

Try from the run prompt in windows.

0 Kudos
Message 6 of 8
(3,164 Views)
Solution
Accepted by tst

@PJackson wrote:

I can paste that same path in the Open dialog of excel and the data loads perfectly..


That's because Excel is doing some fancy path parsing, sees the URL, and loads the file from the web rather than from the local disk. This is in no way standard behavior (although maybe it will be in a few years). Until then, you cannot treat a URL - an address of a file on a remote web server - like a local file. RavensFan's suggestion might work if you have set up file sharing on the remote computer, but then you're doing file sharing, not downloading from the web. To download a file from the web, use the HTTP VIs, or a Datasocket Read, which is probably the easiest option here. For Datasocket Read, provide the URL (http://10.....) as the Connection In, and wire an empty string to Type. You'll get the entire file as string on the data output, which you can feed to Spreadsheet String to Array to get an array.

Message 7 of 8
(3,162 Views)

HTTP Get did the trip..   No luck with DataSocket but didn't give it too much effort.    Thank you all for the quick help.

PeteHTTP_Get.JPG

0 Kudos
Message 8 of 8
(3,151 Views)