1, Using Data loader, can we import Rich Text Area field value as a html file from local folder? Like below



  1. the above html file contains image in the format of base64. if we import the html file then base64 will be converted automatically in to image?

Please help me on the above questions

2 Answers 2


Data with HTML format can be rendered by fields having a Text Area (Rich) Data Type. Mapping HTML data to a non Rich-Text Area field may result to an error or the raw data being imported. To prepare the Data you would need to create a CSV with the Rich text field as one of its Column:

  1. Create a CSV file with one column header that will be mapped to a Rich Text Field.
  2. On this column enter the full HTML code that you wish to upload on the cell.
  3. Use Data Import Wizard or Data Loader

For more information please look into below knowledge article. Export or import Data Rich Text Area field with HTML formatting

  • I able to upload and render If i use raw html code in the csv cell but the problem is csv cell has an limitation 32k characters. i have more than 32k characters which i need to import. I have tried using html file path but i ended with importing raw data(in this case the html file path)
    – user51204
    Jun 7, 2018 at 23:40
  • Aah, Then I have to leave it to the rest of the community. Jun 7, 2018 at 23:57

You may upload html file using Salesforce Files and then query its data as Blob and convert into String using toString method.

List<ContentVersion> cvs = [
   SELECT Id, VersionData
   FROM ContentVersion
   WHERE ContentDocumentId = '<your document id>'];
String htmlData = cvs[0].VersionData.toString();
System.debug(htmlData); //you can save it as Rich Text as well

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .