• Ankit Purohit
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi I am trying to use the XLSX JS libraries to parse a CSV convert to JSON and upload into salesforce object. I had done this in Visual force and wanted to do the same in LWC.
But I am stuck in calling the 3rdd party JS lib method.  My question is how do you call a method in the 3rd lib.
 
import 	shimlatest from '@salesforce/resourceUrl/shimlatest';
import 	dropsh from '@salesforce/resourceUrl/DropSheet';
import 	xlsxfull from '@salesforce/resourceUrl/xlsxfull';

Promise.all([
            loadScript(this, shimlatest),
            loadScript(this, xlsxfull),
        ])
            .then(()  => {
                X = XLSX; / THIS ONE ALWAYS COMES AS undefind 
                console.log('XLSX Value of ' + X);
                if(X !== undefined)
                   X = '';
                   this.initializePage(); 
                })
            .catch(error => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Error loading XLSX modules',
                        message: error.message,
                        variant: 'error',
                    }),
                );
            });

 
Hi EveryOne, 

I need to know how many queries have run so far. Is there any direct method to get that info?
I'm writting a test class for controllers

Thanks alot............