Coder Social home page Coder Social logo

pegros / peg_excel Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.31 MB

Set of LWC Components leveraging the SheetJs library to import / export records from / to Excel spreadsheet directly from the Lightning UI.

License: MIT License

Shell 0.08% Apex 23.46% JavaScript 49.69% CSS 0.74% HTML 26.05%

peg_excel's Introduction


SFPEG EXCEL Components


Introduction

This package contains a set of LWC components primarily dedicated to the import and export of Salesforce records from / to Microsoft Excel spreadsheets directly from the Lightning UX.

It leverages the opensource SheetJs Javascript library to convert Excel spreadsheet data into/from JSON record arrays and adds a SLDS compliant UX layer to easily perform simple import/export operations.

These components were built as contributions/examples for former & ongoing Advisory assignments by Pierre-Emmanuel Gros.

Package Content

sfpegExcelLoaderCmp Data Importer

This component enables to easily:

  • select, upload and parse an Excel spreadsheet (.xlsx extensions)
  • select one of its tab and trigger the import of the contained rows

sfpegExcelLoaderCmp

There is an implicit mapping done by setting the Field API Names of the configured target Object as column headers in the Excel spreadsheet.

Multiple options and controls are available for administrators:

  • insert vs upsert mode
  • automatic RecordType mapping via DeveloperNames
  • automatic Lookup valuation via External IDs
  • possible limitation of the max. number of rows and of the allowed fields
  • possible automatic valuation of a lookup field with the current page record ID

๐Ÿšง Planned for near future ๐Ÿšง

Technical Details

Each component is available for deployment in a dedicated folder (within force-app/main) containing all the dependencies (Apex classes, custom labels, static resource, permission sets...) required to deploy and use it.

The actual SheetJs Javascript library version used is the community mini version addressing only .xlsx files. You may see which version number is used by activating the debug checkbox on the component and change the version by modifying the content of sfpegSheetJs static resource content used by the components.

peg_excel's People

Contributors

pegros avatar

Watchers

 avatar  avatar

peg_excel's Issues

[bug] PEG_EXCEL- Download export fail

Describe the bug
When logged in through VDI, on the last step where the results are exposed we receive a technical error see screenshot below:
Export error

When logged outside VDI, on the last step the results are exposed we get a popup as shown in the screenshot below
Export error_Confirmation
When we confirm to download result, we receive a technical error see screenshot below:
Export error

To Reproduce
Steps to reproduce:

  1. Import a file
  2. If on VDI click on button export, else click OK on pop up
  3. See error in console

Expected behavior
Export status of imports

[feat] sfpegExcelLoaderCmp - Possibility to download import results

Is your feature request related to a problem? Please describe.
Regarding the import results are shown in an iteration using only the key.
However for bulk imports the way the failures and success are shown is not convenient/ readable for end users.

Describe the solution you'd like
The possibility to download the failures and success in a CSV/Excel file with the same columns as the import file + the Id of the success and errors of the failures.

Describe alternatives you've considered
Having the excel import file headers and import results exposed as a property so it can be handled and exported by a parent component.

Additional context
Import with Id and without Id and Name

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.