Questions tagged [csv]

A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form.

Filter by
Sorted by
Tagged with
3 votes
1 answer
43 views

How to calculate how much storage a CSV will use when uploaded to SObject

So I have a .csv file that contains ~12,000 rows and on my local filesystem takes up about 3MB of data. I assumed that when I imported this csv into a Salesforce Object, the data would still take up ...
0 votes
1 answer
42 views

PapaParse in LWC after Winter '23 heightened security?

I am trying to use PapaParse (a Javascript CSV analyzer library) in a Lightning Web Component. A lightning modal hosts the tool. Although I have seen examples of doing so in the past, I have been ...
  • 322
0 votes
1 answer
126 views

How to save a csv file to folder

I needed to do generate a csv file and save it to salesforce folder every day at 08:00 AM. So i did the generating a csv file every day at 08:00 AM with: public class TrucksExport implements ...
  • 3
0 votes
0 answers
19 views

How to parse CSV file containing line breaks within the CSV cells using Apex [duplicate]

I have a CSV file uploaded in Salesforce Document, That CSV contains line breaks within the cell. So when I try to parse this CSV file with "csvFileContent.split('\n')", I am expecting all ...
0 votes
1 answer
57 views

Can I convert a JSON property (not full JSON) to csv with DataWeave without parsing it first to an Apex class?

It's been very easy with DataWeave in Apex to convert a JSON to a csv. However, I'm getting a JSON from a REST call, and the part I'm interested in is located in the "data" property, ...
-1 votes
1 answer
60 views

Nested Json response to csv conversion

I got this response from API however I couldn't be able to parse name because of the nested objects, example this is my query trying fetch permissionSetAssignment records from one org to other in ...
1 vote
0 answers
45 views

Apex - PageReference - Report URL

When our org was in classic, we had the below code which used to save a report as an Attachment. This has worked for the past 7 years... PageReference reportLink = new PageReference('/'+reportId+'?...
3 votes
1 answer
362 views

Escape Comma in Column While Creating CSV in LWC

I need to escape comma in Column values while Creating CSV file in LWC. I tried with replacing comma with Keywords but still when converting string into blob it splits value with comma. I'm sending ...
0 votes
2 answers
35 views

how to take single field value when use the ',' in field value in csv file

for(sObject sObj : scope) { AggregateResult ar = (AggregateResult)sObj; Integer IdCount = (Integer)ar.get('cnt'); String accName = (String)ar.get('accName'); ...
0 votes
1 answer
94 views

Can you chunk a csv file by passing the parsed file to a Batch Class?

I have a class that is parsing a csv file but running into heap limits. To resolve that I am converting it into a batchable class. However the List of lists is not getting accepted. I am getting the ...
  • 343
0 votes
0 answers
40 views

I want attach csv to opportunity using salesforce function

Hello I want to Attach document to a record which is a csv file, I want to use the salesforce function for that. Below is my code and it is giving me some error. public class MyfunctionFunction ...
0 votes
0 answers
445 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
18 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 ...
  • 41
-1 votes
1 answer
390 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
631 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
2k 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
40 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 ...
  • 1
0 votes
1 answer
73 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 ...
  • 17
0 votes
1 answer
382 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
125 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
1k 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
397 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, ...
  • 103
0 votes
1 answer
423 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
51 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
525 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
243 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
2 answers
2k 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 ...
  • 41
0 votes
1 answer
179 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
2k 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
2 answers
1k 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
316 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
27 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 ...
1 vote
1 answer
1k 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
94 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 ...
  • 411
0 votes
1 answer
106 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
202 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.
  • 451
0 votes
1 answer
566 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 ...
  • 73
0 votes
2 answers
635 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 ...
  • 91
2 votes
2 answers
2k 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
262 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
535 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 ...
  • 65.8k
1 vote
0 answers
721 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
376 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+ ...
  • 3
1 vote
1 answer
194 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
33 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
305 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
193 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 ...
  • 63
0 votes
1 answer
752 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/...
  • 83
1 vote
1 answer
681 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
808 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 ...

1
2 3 4 5 6