0
votes

I am trying to get an SPList data using owssvr.dll method. It is working fine. Now i try to get a specific View data but getting "cannot complete this action error". Any possible error.

This is the code i used, any mistake with this query. Or need anything to be installed. http://spp/_vti_bin/owssvr.dll?Cmd=Display&List={fcca72f4-010b-458d-8413-429df93279b6}&View={4a0b9bb1-4ce8-412f-86c0-d12690da7fd7}&XMLDATA=TRUE

Without the View Parameter i am able to get all the datas without any error.

1

1 Answers

0
votes

I'm not sure that it makes a difference but try building the URL with the splist and spview GUID's encoded. It would look something like this:

http://spp/_vti_bin/owssvr.dll?Cmd=Display&List=%7Bfcca72f4-010b-458d-8413-429df93279b6%7D&View=%7B4a0b9bb1-4ce8-412f-86c0-d12690da7fd7%7D&XMLDATA=TRUE&noredirect=true

Note the '&noredirect=true' at the end. Not sure what affect it has, but worth a shot.

I'm not sure if the URL being encoded matters, but this method is repeatably successful for me.

Of course be sure you have the correct GUID for the view. You can find a URL encoder/decoder here