0

enter image description here

Via the user interface in Sharepoint there is the possibility to export a list as .csv. Unfortunately, you can only load the items from the list via the Rest API, but not download the entire list as a file.

The problem with querying the items in the list is that values ​​in the list that come from another table are not loaded and are only returned as an ID.

So is there a way to load the list as a file via the rest api?

1 Answer 1

0

You can create custom command set button to export details.

Below is the similar sample which is exporting only selected items to Excel but you can modify your extension in such a way that it can be enable without any item selection and you can write your own logic to export all the items.

https://github.com/rjesh-git/sp-dev-fx-extensions/tree/master/samples/js-command-selecteditems-export

Guideline for SPFX Extension

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api

Hope it will helpful to you

1
  • With Sharepoint in the web application, I can export the list as a CSV and it loads all items from other lists. (That's exactly what I want!) So the problem isn't the Export button in Sharepoint, it's that I can't download the list via the Rest API with the items from the other lists. At the point where a value from another list should actually be dynamically inserted, you only see a reference to the list as an ID (e.g. in the column for the name there is instead: "Joe Smith" an id "12" because Joe Smith from a another table was not loaded dynamically). Commented Jul 26, 2022 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.