Questions tagged [csv]
A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form.
259
questions
0
votes
0
answers
33
views
Download Data Extension to csv or Excel file via Cloud Pages (Marketing Cloud)
a team in our company needs to be able to download a data extension, and they would prefer to go to a Cloud Page address and just click a download button to download a file in their browser instead of ...
0
votes
1
answer
12
views
Modify string value in soql list and add back to list
I have a VFP which functions as a CSV download. In my controller I return a simple SOQL list from a custom Customer object. I need to modify the Name being returned to remove all commas and then add ...
-1
votes
1
answer
49
views
Converting CSV to an APEX List [closed]
I have a csv file downloaded with 1 column listing about 3000 names. What is the simplest way to grab all these names and store them in a List to be further manipulated in Apex?
Thanks!
1
vote
1
answer
134
views
How to process papa parse results in apex class
Folks,
I want to parse CSV files with papa parse in apex. I have a lwc to upload the file and a custom apex class to massage the data and insert results to custom object. My question is what do I ...
0
votes
1
answer
68
views
Generate CSV , EXCEL file dynamique with lightning web component
I have a problem with my code , I want to generate a file ( CSV / XLS ) , but with my code I get nothing , I don't now what is the problem .
Some help please .
<a target="_self" class=&...
0
votes
0
answers
22
views
Load a CSV into a Pardot landing page for parsing
I'm trying to do something that may be a little crazy. I want to load a CSV file into a Pardot landing page so that I can parse it and use the data to populate variables on the page based on a query ...
0
votes
1
answer
43
views
Creating records from csv is running twice
I wrote a lightning component that reads a csv file and creating records with relationship, e.g opportunities and their related contacts in each row. some of the contacts already exists in org ...
0
votes
1
answer
151
views
RecordTypeId not getting uploaded from csv file to Salesforce org using SFDMU tool. Error: Value does not exist or does not match filter criteria
I am using SFDMU tool (Salesforce Data Loader SFDX Plugin) to upload csv data files to a target salesforce org. I have 3 records A, B and C in an object in a hierarchy. Record B is in a self-lookup ...
-2
votes
1
answer
53
views
Dataloader Insert Problem
I'm trying to insert an Excel data in my org via Dataloader. But, when i try to use INSERT with the .csv file, i can't find the 'State__r:State__c:Code__c' in the mapping field.
Error> State: id ...
0
votes
1
answer
301
views
How to create a test class for apex that reads CSV file
I was trying to test my apex class that gets a CSV file, reads it and creates actual records.
In my test class I tried to convert my CSV string into base64 string. Then I used this line of code Blob ...
0
votes
1
answer
161
views
SSJS Automation Studio - Read imported CSV file
I'm new to SSJS and Automation Studio. What I'm trying to achieve is a simple automation based on the CSV File Drop -
File Drop -> Script
After a CSV file was dropped into a specified location, ...
0
votes
1
answer
101
views
How to split csv string
I am using dataloader and retrieve data like that:
"0017Q000003T1EdQAK","sForce ""Test"" ","Some,data","","94087",""
...
0
votes
0
answers
27
views
Is it possible to import IsMasterLanguage field from CSV file in UI import articles feature in salesforce lightning?
Hi guys I am trying to import salesforce knowledge articles from CSV file however I am getting an error that displays IsMasterLanguage column in the header cannot be mapped. So I wanted to know ...
0
votes
1
answer
100
views
convert list of records into CSV file [closed]
I have to create lwc quick action to convert related contacts in to csv download.
I had have creating lwc quick action button and retrieved the data needed. There is problem in converting to csv.
I ...
0
votes
1
answer
30
views
Insert record from static resource csv
I have csv file with account records and want to insert that records via apex. How can i do it and dynamically find necessary fields? I can only manually assign them and its hard to parse cause of ...
0
votes
1
answer
99
views
Export data and download file
I am exporting some data into csv from org and want to download that file. Now i can just send it to email. Any ideas?
List<Account > acclist = [Select id,name , CreatedDate , lastModifiedDate ...
0
votes
1
answer
18
views
How to remove all unicode characters from a blob?
I have a requirement to parse the contents of a csv blob which has unicode characters. When I am trying to parse it using
Blob myBlob = EncodingUtil.base64Decode(response.getBody())
I am getting an ...
-1
votes
1
answer
766
views
How to parse a CSV file into JSON using APEX?
I am getting a CSV file as a Blob in response to one of the callouts. I need to parse this CSV file and convert the contents into a flat JSON structure. Is there an inbuilt way to parse CSV in apex ?
...
0
votes
1
answer
503
views
'Field Not Found' and 'Required Field' Error Importing CSV to Data Extension
I just tried importing a .CSV file to a Data Extension (there are only 3 rows as I'm doing a test), but I keep getting an error. My CSV files have the right headers that can be mapped, so I'm not sure ...
1
vote
1
answer
64
views
Is there a way to upload/insert a particular custom object record and its related file document from one single csv file using data loader?
Hi it would be great if anyone could help me out with this.
I have encountered a requirement in salesforce where I have to upload/insert a custom object record and its related file attachment into ...
0
votes
1
answer
24
views
CSV file adding default row by using excel
As you can see in the image below I'm trying to open a CSV file by using Excel but every time I tried there is a row that I don't need excel add it by default, how can I remove this option I don't ...
0
votes
0
answers
98
views
Integrate Salesforce with SFTP [duplicate]
How to integrate salesforce with SFTP through rest api? I need to send csv file to SFTP. Please suggest.
0
votes
1
answer
495
views
Read a csv file that is stored in Attachment Object
I have an excel/csv as an attachment related to an EmailMessage. I want to read the csv, process the data and create certain records(of custom object) based on that data. I want to understand how I ...
0
votes
0
answers
37
views
Test.loadData is not inserting data for Producer object
I am working on a Data Factory test class and I was able to successfully load relational data for Account, Case, WorkOrder, User, InsurancePolicy and couple of other custom objects by providing Id in ...
0
votes
1
answer
48
views
How to import two values that are in the same excel field separated by a comma
I just got an .csv file that i need to import into my sandbox as a custom object, it looks like this:
The value that is on the left side of the comma should be stored as a field (called Location).
...
0
votes
1
answer
55
views
E-Mail with csv attachment processed in Salesforce [closed]
It is possible to send an email with an attachment to salesforce and that this attachment will be processed there? The attachment contain multiple columns and rows for update or create records.
0
votes
1
answer
219
views
How to force ANSI Encoding on a generated CSV attachement in apex?
I want to generate a csv attachement and force ANSI encoding how can i do that?
Code to create my attachement:
string rows = 'column1;column2;column3'+'\n'+'a;b;c'
Attachment attachment = new ...
0
votes
2
answers
316
views
Handle double quotes in a long text field when generating a CSV file from apex
I have a custom object in which I have a long text area field. I am querying it in apex and building a CSV and sending an email with csv as attachment.
The value in the long text area field and which ...
1
vote
2
answers
999
views
Parsing large CSV file in LWC
I have implemented the following code to parse a csv file, convert to a JSON array and send the JSON result to apex controller, which invokes the batch class to process the DML operation for ...
0
votes
3
answers
90
views
CPU Limit Exceeded Visualforce Page Controller
I am running into a CPU limit error when processing more than + or - 300 rows from a .csv file, via a Visualforce page/controller. I realize CPU limits can have a lot to do with other items running ...
2
votes
1
answer
259
views
Comparing string in CSV header against expected value yields not equal when debug log shows they are identical
I'm reading a CSV file saved in a ContentVersion
The CSV header looks like:
FirstName,LastName,...
I'm checking to make sure the first line (header row) matches the expected column headers using this ...
1
vote
0
answers
283
views
Value provided is invalid for action parameter 'fileContent' of type 'Blob'
So, I'm trying to pass a csv file to apex, with a lightning input type file and a button with an onclick that calls to the apex method, receiving a blob variable:
@AuraEnabled
public static String ...
0
votes
1
answer
113
views
Create CSV from SOQL query
I'm trying to download the results from my SOQL query as a CSV, but when I choose "Bulk CSV" the resulting file contains the query itself and not the result set.
List view shows 21k+ ...
1
vote
1
answer
92
views
Searching CSV Data stored in Long Text Field
I am new to Salesforce and wanted to get some guidance on building a solution for the following use case. I am currently working on a Salesforce project building a hotel reservation system for service ...
0
votes
1
answer
24
views
How to exclude leads from an imported .csv file regarding to their job title or any other attribute?
Hello!
I am trying to automate the lead importing process to save some time. Usually what I do whenever we have a list of participants to virtual events (.xlsx), is a VLOOKUP command to find duplicate ...
0
votes
0
answers
83
views
Upload csv files from ftp into SF via Apex (without insertFile Tag) [duplicate]
I want to automatically upload csv files into Salesforce on a regular basis, doing a scheduled job. I want to have this job centralized so that everybody has access to the code and the process. I want ...
0
votes
1
answer
92
views
In my aura component CSV export, double quotes break the export
I have an aura component that exports a list of cases to a CSV. In the description field, customers have been inserting double quotes in the field (example "variable") which breaks the ...
0
votes
1
answer
350
views
Convert list of object to CSV string
I'm using the d3 library trying to do a geo chart with LWC. To do so I need a csv file with my values in it like the example bellow
var promises = [];
promises.push(d3.json('d3js/map-population/...
1
vote
1
answer
350
views
Issue with Export to Csv when name consists of comma
we are trying to export data into csv file using Apex and Visualforce page in Salesforce .
The data is being exported but we have an issue .
Here we are exporting record from an object(Text Fields) .
...
1
vote
0
answers
498
views
Empty Column in Csv , when exporting data as csv using Lwc component
I'm very new to salesforce and lwc , i'm trying to Export some static and some dynamic data in a csv using LWC Salesforce and succeeded in that( except with a new column has been added from the
...
0
votes
1
answer
313
views
PapaParse - Want to ensure Chunks processed in sequence. Apex response need to fire next processing sequence
How can i ensure when first Chunk inserted in SF then need to fire second chunk to make sure sequential processing? I am able to chunk the records in SF and format accordingly but need to insert ...
1
vote
1
answer
187
views
Email Attachment as CSV issues
if I run this code in developer console, I receive the attached csv in an email. However the output of the code is javsscript code instead of the data
String ReportId = '00O3300000331x3XXX';
...
0
votes
1
answer
577
views
Convert XLSX into CSV in Apex [closed]
We are having some hard time converting a ContentDocument of type XLSX into CSV inside Salesforce APEX code. What we are looking for is a way to convert the stored XLSX file into SF to be converted ...
0
votes
1
answer
40
views
CSV with autofit column from lightning component [closed]
I am exporting csv from lightning component.
But I need to ensure that column in autofit as per the column data when downloaded.
Thanks
-3
votes
1
answer
349
views
How to format Excel Column in Apex? [closed]
I'm sending an email via scheduler class with an excel file as an attachment, but the data in the file does not appear to be in proper format. Please check the following image:
The code I'm using to ...
0
votes
0
answers
49
views
Inserting bulk records from CSV on an object and capturing error rows
I am working on parsing CSV file to insert bulk records on an object (OBJECT 1)and populate two lookup fields(OBJECT 2 & OBJECT 3) on it. If the lookup records are already present in the database ...
0
votes
1
answer
25
views
CSV date probelm
I am creating the CSV using the batch code.
Here is the code
Date testDate = 07/08/2020;
String monthOfTheDate = testDate.month()+'';
String dayOfTheDate = testDate.day()+'';
Integer monthSize = ...
-1
votes
1
answer
53
views
string.isempty doesn't appear to work when trying to retrieve price list Name
it appears my if statement with String.isEmpty doesn't seem to be working. What i want it to do is check if a price list entry doesn't exist it creates a new one, and if it does it updates that one. ...
0
votes
1
answer
49
views
Not Able To Update Price Entries
I am trying to insert products, then those products then create price entries if they don't already exist but if they do exist they update the previous price entry based on the name of the product ...
0
votes
2
answers
29
views
Best way to convert SOQL when doing an import of data
I was wondering what would be the best way to convert the below code ,which is importing price book entries, so it doesn't hit the governor limits.
for (Integer i = 1; i < csvFileLines.size(); i+...