Tos Web Developer provides insights, tutorials, and advice around topics including content strategy, design, Drupal Development, Drupal Custom Module Development, Drupal 8 Custom themes, PHP, Server, Twig, and more

CSV ,XML JSON EXPORT IN DRUPAL8


For Export Blog content using View Data Export Needs To Install the Following Module


https://www.drupal.org/project/views_data_export


And also need to install Requires Modules


  • RESTful Web Services

  • Serialization

  • Views

  • Filter

  • User

  • System

  • Serialization (CSV)


Expecting Serialization ( https://www.drupal.org/project/csv_serialization ) module all are core modules.


Note:- CSV SERIALIZATION module needs to install via the composer because of dependency libraries.

the following link and command how to install using Composer 


$ composer require 'drupal/csv_serialization:^1.4'


https://www.drupal.org/project/csv_serialization/releases/8.x-1.4 


If You are not able to install using the composer please follow below Composer alternative Steps to install module with dependency libraries.


This module supports Ludwig, a manual alternative to managing Drupal modules with Composer.


Once Successfully install View Data Export Module Follow Below configuration steps to Export blog post data

CONFIGURATION

-------------


1. Once Successfully install View Export Module with all dependency follow below steps


2. Navigate to Administration > Structure > Views and create a View Page that will display the information that you want to filter and export.





   (You will go to the path of this page to generate the export once done).

   The View can be whatever display/format type that you need as it will be

   the interface that the user will filter by and then export data from.


 3. Add the fields that you want to display and include in the export, then add the exposed filters that you want to filter by in order to create custom exports (user role, status, pretty much any field you need).




 4. Add a new display and select Data export.




 5. From the Format fieldset, select the Data export settings. 

    Select from:

    CSV, JSON, or XML formats. Request formats that will be allowed in responses. If none are selected all formats will be allowed. Apply.



6. From the Pager fieldset, set to 'display all items' for the data export.

   Otherwise, the results will be limited to the number per page in the pager

   settings.


7. From the Path Settings fieldset, change the "Attach to" settings to

   "Page".to attach the data export icon to the selected displays.


8. Ensure that the 'path' for the data export is a file, with an extension matching the format. ie: /export/foo.csv. Otherwise, the file will be downloaded without a file association.

   



9. Navigate to the path of the View Page to generate the CSV File.

Above all steps for Export Data In CSV using View Data Export Module

Thanks !!!!

No comments:

Post a Comment

| Designed And Blog Post by www.toswebdeveloper.com