Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, October 1, 2018 8:00 AM | 1 vote
I am trying to extract data from a sharepoint 2010 list by using owssvr.dll but if I use the syntax found in the documentation and in all examples for such a query I get no data and if I change the syntax a bit I get data from the default view on the list.
If I use the following syntax:
http://[MyServer]/sites/[MySite]/_vti_bin/owssvr.dll?Cmd=Display&List={[MyList]}&View={[MyView]}&XMLDATA=TRUE&noredirect=true
I get a "page cannot be displayed" (MyList and MyView are correct values). If I change view to viewID in the URL (change highlighted below) so I use the below I get data from the default view on the list.
I am probably missing something obvious but I cannot see it so any help would be appreciated.
http://[MyServer]/sites/[MySite]/_vti_bin/owssvr.dll?Cmd=Display&List={[MyList]}&ViewID={[MyView]}&XMLDATA=TRUE&noredirect=true
Bispen
All replies (10)
Monday, October 1, 2018 3:19 PM | 1 vote
Hi
Syntax is below:
http://sharepoint.com/\_vti_bin/owssvr.dll?Cmd=Display&List=\<<LIST-GUID>>&XMLDATA=TRUE
more details please refer to below link:
http://www.sharepointdiary.com/2012/02/using-owssvrdll-to-retrieve-list-data.html
Tuesday, October 2, 2018 3:46 AM | 1 vote
Hi,
Use View GUID instead of the view name.
http://Server_Name/[sites/][Site_Name/]_vti_bin/owssvr.dll?Cmd=Display&List=GUID&View=GUID
Information about URL protocol:
/en-us/previous-versions/office/developer/sharepoint-2010/ms478653(v%3Doffice.14)
Best regards,
Linda Zhang
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
Tuesday, October 2, 2018 7:53 AM
Hi
Thanks for the suggestions. I am using GUID's for both values - sorry if that was not clear from my initial post.
I am confident that my guid values are correct because if I use them to make this call:
http://%5BServer%5D/sites/%5BSite%5D/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=%7B%5BListGUID%5D%7D&View=%7B%5BViewGUID%5D%7D&CacheControl=1 I get an iqy file with that data in my view, but if I use same values to make this call: http://%5BServer%5D/sites/%5BSite%5D/_vti_bin/owssvr.dll?Cmd=Display&List=%7B%5BListGUID%5D%7D&View=%7B%5BViewGUID]} I get an "Error cannot complete this action".
so I still struggle to find out what could be the issue :-)
Bispen
Wednesday, October 3, 2018 1:11 AM
Hi,
Check the ULS logs when running _vti_bin/owssvr.dll, see if there are some error about this issue.
Best regards,
Linda Zhang
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
Wednesday, October 3, 2018 7:35 AM
Unfortunately I only have access to the front end of sharepoint so I cannot see the log files. But thanks for the suggestion. Is there any chance that I can see something about the problem via the developer tool in the browser?
best regards
Hans Jørgen
Bispen
Tuesday, October 9, 2018 3:07 AM
Hi,
Try using the Fiddler to monitor.
Best regards,
Linda Zhang
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
Tuesday, October 23, 2018 2:21 PM
Thanks for trying to help me out. It turned out that the problem was: The view I wanted to use had several person/group columns and after removing a number of these from the view I could use it to extract data. So I have to make a second view wiht the rest of the columns I want to use and combine the two extracts.
Bispen
Tuesday, October 23, 2018 3:58 PM
Bispen - just to clarify for future readers, the method did not work when using views that contained user columns? Please clarify.
Wednesday, October 24, 2018 6:43 AM
Sorry for being unclear:
Originally the view had 5 person/group fields (plus a number of dates and text fields) and it was not until i removed 3 of the 5 person group fields it worked. I am aware that there is a limit to the number of person/group fields you can have in a view but I do not know if the limit to number of person/group fields you can extract is even lower in general or if it just on our sharepoint (2010) installation.
br
Hans Jørgen
Bispen
Wednesday, October 24, 2018 1:27 PM
How many columns does the list have?