11 votes

End user cannot open a .xls report exported from Salesforce

We experienced the same issue and found a workaround that works for us. Right click the excel file you downloaded, click on properties. On that screen hit the "unblock" button and then hit apply. You ...
Eyal Marmareli's user avatar
10 votes

End user cannot open a .xls report exported from Salesforce

Is KB3115322 (Security Update for Excel 2010) installed? If so, uninstalling this update worked for us. I notified Salesforce about the problem so that either Salesforce or Microsoft fixes the issue,...
R Kwong's user avatar
  • 101
8 votes
Accepted

End user cannot open a .xls report exported from Salesforce

I contacted Salesforce's Support team and they provided this article as a temporary fix. They also mentioned: "Our R&D team has investigated this matter and logged a New Issue for it to be ...
Piya Fiedler's user avatar
6 votes
Accepted

Is there a way to dynamically fill excel sheets from apex?

Here's a slightly (well...much) more complex way of generating an Excel document using Visualforce, but it's much easier to get a good looking result that's an actual xls file, including native Excel ...
Shane Steinfeld's user avatar
6 votes
Accepted

How can we use VF page to download excel inside Lightning component without redirecting?

This solution is implemented using Aura framework. I have posted a similar solution using LWC as well. This is an interesting scenario. In past, I have used download.js to trigger file download from ...
Saroj Bera's user avatar
  • 14.7k
5 votes
Accepted

Can an Apex Email Handler parse an attached Excel file?

Short Answer: No its not posssible to read Excel in Apex. Long Answer: Excel files(xls,xlsx etc) are not a text based file. They are binary files. Thus unlike CSV(text based) they cant be read line ...
Pranay Jaiswal's user avatar
4 votes
Accepted

Warning when opening Apex generated Excel .xls?

Excel is warning you that the internal structure of the file is not a real Excel Workbook format. The software is intelligent enough to recognize that it is something else (I presume you're rendering ...
sfdcfox's user avatar
  • 491k
4 votes
Accepted

partial formatting in excel cell using xml spreadsheet in salesforce

An excel cell row which have partial worlds in bold should look like this: <Cell> <Data ss:Type="String"> <Font html:Color="#000000" xmlns="http://www.w3.org/TR/REC-...
Ashwani's user avatar
  • 22.6k
4 votes
Accepted

Excel download from API

You can use a data URI to download the file: action.setCallback(this, response => { let a = document.createElement('a'); a.href = 'data:application/vnd.ms-excel;base64,'+response....
sfdcfox's user avatar
  • 491k
4 votes

Display VF page content into Excel File - doesn't display all contents in excel file

Setting the contentType property of a Visualforce page does not perform any conversion of the data. Your page is still rendered as HTML; the server simply claims it is an Excel sheet, which is not ...
David Reed's user avatar
  • 92.8k
3 votes
Accepted

Render page as excel, default output is without gridlines

When we download Excel using default code(Like your) we don't get much styling and also the gridlines are missing as well. To handle this you need to modify your code and need to create excel in ...
Tushar Sharma's user avatar
3 votes

Importin Excel files in xls format

Unfortunately, it doesn't support xls files. Format: When you create the file of subscriber data to be imported into the application, save it as a tab-delimited .txt file or a comma-delimited ....
Selim Sevim's user avatar
3 votes

CSS for Excel Accounting Format?

You can place the currency symbol in the first column, and then you can display the currency value (without the currency symbol) in the second column. The last step would be to remove the border ...
Grant Miller's user avatar
3 votes
Accepted

Dataloader = CSV = Numbers = Scientific Notation

If you are using Dataloader, I believe, that's the best option (You are already doing it). DON'T open the file at all. You can try ETL tools, such as Informatica , Jitterbit etc
Amit Sahu's user avatar
  • 141
3 votes
Accepted

Rebuild Excel Formula "Rate" in Apex

Here's the code I came up with, based on some examples in javascript I found online. I tested it for a number of different scenarios and was able to get the same results as in Excel. public class ...
Guy Clairbois's user avatar
3 votes

Generate CSV , EXCEL file dynamique with lightning web component

First of all, you're using tabs instead of commas, so this is a TSV (Tab-Separated Values) file, not a CSV (Comma-Separated Values) file. This may cause problems in Excel and other programs trying to ...
sfdcfox's user avatar
  • 491k
2 votes

Visualforce export to Excel on mac

My understanding is that none of these solutions will generate a real XLS file. The best result we will get is an HTML file with a wrong extension (.xls), which MS Excel will read and then convert to ...
Gabriel C's user avatar
  • 451
2 votes

Formating of Excel generated by VF page

I haven't tried it, but take a look at this. Instead of using HTML tags, it uses tags that are recognised by Excel. In terms of XML markup, I think that page is slightly wrong, this seems like a good ...
powlo's user avatar
  • 2,650
2 votes

Handling Empty Rows of Excel in Apex

You can easily do this. Remove all comma and check for size and if length == 0 then ignore the line. for(String line: lines) { if (line.replaceAll(',','').trim().length() == 0) break;
Tushar Sharma's user avatar
2 votes

Export to Excel with Command Button

The options I can think of offhand: Conga Composer offers the ability to merge salesforce data into templates, which can be excel files. You can read more on their website. Linking to an existing ...
battery.cord's user avatar
  • 8,825
2 votes

Is there a way to dynamically fill excel sheets from apex?

There exist third-party AppExchange packages that can perform configurable mail merges into existing Excel documents. This sounds like it could be a core use case for one of those tools. One such ...
David Reed's user avatar
  • 92.8k
2 votes
Accepted

Visualforce Excel Export Issue

For anyone looking up this problem in the future, I've used an external JS library called SheetJS. You can put the script tag in your VF page and send the data as a blob to your apex controller. You ...
Atlas Can's user avatar
  • 1,877
2 votes

Salesforce version of vlookup - returning counties based on zip code

I see you have this tagged as formula, I would not advice attempting a formula. There are limits to how big a formula can be and if you have over 1000 matches, you'll most likely hit this limit. You ...
gNerb's user avatar
  • 9,491
2 votes
Accepted

Is it possible to convert numbers from Base 10 to Base Alphabet and back again using formula fields?

You'll have to tweak it a little bit if you want A = 0, AA = 26, but this should do the trick: IF(CONVERT_TO_BASE26__c >= 26^2, CASE(FLOOR(CONVERT_TO_BASE26__c/(26^2)), 1, 'A', ...
Shane Steinfeld's user avatar
2 votes
Accepted

How to format Excel Column in Apex?

The general answer is "you can't". Excel (and other document formats) are complex, and there aren't any (or are only very few, and quite limited) tools on-platform that can manipulate such ...
Derek F's user avatar
  • 61.6k
2 votes

How to merge the header cells of the .csv file when exported on the button clicked by using lightning web component and apex code

CSV files do not support merged cells, or indeed any style or formatting. If you need to control the output format, consider using a document generation product from the AppExchange to generate a ...
David Reed's user avatar
  • 92.8k
2 votes
Accepted

How to write on an Excel file stored in static resources

Manipulating things like .xlsx, .docx, and .pdf files is theoretically possible, but practically impossible (no standard functionality for doing zip/unzip on files, poor binary stream support, limited ...
Derek F's user avatar
  • 61.6k
2 votes
Accepted

Problem with HYPERLINKs that contain a space, combined with export of report to Excel

The solution is to convert spaces to %20 before using the HYPERLINK function. So instead of this: HYPERLINK(Photo_URL_1__c, Photo_URL_1__c) you should do this: HYPERLINK(SUBSTITUTE(Photo_URL_1__c, ' '...
Sander de Jong's user avatar
2 votes

CSV file adding default row by using excel

I would assume this is because you did not check the Include column headers box on export, so it is assuming that the top row is just another row and not the headers for your data. The above is from ...
Gortonington's user avatar
  • 30.6k
2 votes

How to copy data from Excel to LWC lightning datatable?

You just need to capture a paste event, and then you can parse the data. Here's a quick example: <template> <lightning-datatable data={data} columns={columns} key-field="value"&...
sfdcfox's user avatar
  • 491k

Only top scored, non community-wiki answers of a minimum length are eligible