+ Start a Discussion
Richa_LearningRicha_Learning 

Help Needed : Export data in excel or csv

Hi,
I am new to Apex and SOQL. I tried creating the nested query in workbench and it works fine and return 80K rows. Below is the query
SELECT ID,name,region__c, tracker__c,
(select id,Account__r.name,product__c from product_account__r),
(select year__c from product_year__r)
FROM tracker__c
My issue is how do I export this in excel or csv. I read blog and it was mentioned that we need to write a code. Could someone please help me here.
I want to export the data to excel or csv that is coming from this query.(80K rows)

Thanks.
 
Surya Prakash TomarSurya Prakash Tomar

Hi Richa,

 

Are you really talking about the workbench according to my knowledge workbench doesn't support to nested query?

And workbench provides the functionality where you can easily export the result in bulk csv, Please see in screen shot.User-added image

Richa_LearningRicha_Learning
Yes, please see below. I used tis query in workbench and i got the results. But I cannot export this result in excel or csv. bulk csv gives issue for this query "InvalidJob: Unable to find object:tracker__c"

User-added image
v varaprasadv varaprasad
Hi Richa.

Please use salesforce Export to CSV extension using this we can Export Data.
More info : https://chrome.google.com/webstore/detail/sdfc-dev-console-data-exp/mfcddagpdnfokfnbnoeephmfoifgdbid

Add above extension to chrome.


Hope this helps.
please check once and let me know if any help need.

Thanks
Varaprasad.





 
v varaprasadv varaprasad
Through workbench also we can Please select BULK CSV instead of List.

Thanks
Varaprasad
Richa_LearningRicha_Learning
Hi Varaprasad,
I added this to chrome. I am not able to find on the dev console. I dont see the icon on dev console window.User-added image
Richa_LearningRicha_Learning
through workbench I get this error when i choose bulk csv.

InvalidJob: Unable to find object:tracker__c
v varaprasadv varaprasad
User-added image
Richa_LearningRicha_Learning
I clicked on setup--> dev console --> that opened a new dev console window. Ran query but still i dont see this extension.

User-added image
Richa_LearningRicha_Learning
It worked. But i have 80K rows. I ma not bale to download all 80K rows.
v varaprasadv varaprasad
Hi Richa,

Divide query into to parts like

Ex : 1. select id,name from account limit 40000
       2. select id,name from account offset 40000 limit 40000

Hope this helps.
please check once and let me know if ny help needed.

Thanks
Varaprasad
      
Richa_LearningRicha_Learning
Yes. Correct.
Surya Prakash TomarSurya Prakash Tomar

Hi Richa,

 

Bulk queries only support the simple queries and it's not supported nested SOQL which is the reason you are getting this error..