Giter Club home page Giter Club logo

csvdataexporter_lwc's Introduction

CSV Data Exporter - Lightning Web Component (LWC)

CSV Data Exporter is a Salesforce Lightning Web Component (LWC) that simplifies the process of exporting data from Salesforce objects into CSV format. This component provides a user-friendly interface for selecting and exporting records, making it easier for users to retrieve data for reporting and analysis.

CSV Data Exporter Demo

Table of Contents

Features

  • Export data from Salesforce objects to CSV files.
  • Choose specific records or export all records.
  • Customize exported fields to meet your requirements.
  • Designed for Salesforce Lightning Experience.

Installation

To use this Lightning Web Component in your Salesforce org, follow these steps:

  1. Clone or Download this Repository:

    • Clone this GitHub repository to your local machine using the following command:
      git clone https://github.com/s4SHIVam7/csvDataExporter_lwc.git
      
  2. Deploy the Lightning Web Component:

    • Deploy the CsvDataExporter Lightning Web Component to your Salesforce org.
  3. Configure the Apex Controller:

    • Modify the CsvController Apex class to fetch the data you want to export.
  4. Add the Component to Your Salesforce Page:

    • Add the CsvDataExporter component to your Lightning App or Record Page.

Usage

  1. Open a Salesforce Lightning Page or App:

    • Navigate to a Salesforce Lightning Page or App where you've added the CsvDataExporter component.
  2. Select Records for Export:

    • Select the records you want to export by checking the checkboxes in the data table.
  3. Export Data:

    • Click the "Export Data" button.
  4. Download CSV File:

    • A CSV file containing the selected data will be generated and downloaded.

Customization

You can customize the fields that are exported by modifying the columns property in the CsvDataExporter.js file. Adjust the label, fieldName, and type as needed to match your Salesforce object's schema.

columns = [
    { label: 'Account Name', fieldName: 'Name' },
    { label: 'Phone', fieldName: 'Phone', type: 'phone' },
    { label: 'Industry', fieldName: 'Industry', type: 'text' }
];

Additionally, you can customize the Apex class and SOQL query in the CsvController to fetch data from your specific Salesforce objects. Update the class and query to match your Salesforce data structure.

public static List<Account> fetchRecords() {
        return [SELECT Id, Name, Phone, Industry From Account WHERE Phone != null ORDER BY LastModifiedDate DESC Limit 20];
    }

ScreenShots

  1. Main Component image

  2. Result 2(Selected Records using Checkbox): image

  3. Result 2(All Records using Checkbox): image

  4. Download Window: image

  5. Csv File (only Selected Records): image

  6. Csv File (All Selected Records): image

Contact

For questions, support, or feedback, please feel free to reach out:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.