Skip to main content

#Microsoft Excel2 discussing

Bonjour, 

L'un de nos utilisateurs a créé un tableau utilisant comme connexion, un tableur excel (avec deux feuilles).  

Lorsqu'il modifie la connexion pour déposer une nouvelle version du fichier excel, celle-ci n'est au final pas mise à jour. 

Lorsque je procède à la même manipulation, je dépose la nouvelle version du fichier, les données sont mises à jour. 

Pourquoi ?  

Qu'est-ce qui peut bloquer ?  

D'avance, merci 

 

#Tableau Desktop & Web Authoring  #Microsoft Excel

1 answer
  1. Sep 27, 12:32 PM

    @Pierre Muckensturm Hi, thanks for your posting, I used translator for your query from French to English. If the Tableau workbook is embedded with file extension *.twbx that means that the Excel file is part of the workbook and the location is temporary. This means that it doesn't point directly to your updated sheet. To achieve that, unpackage your workbook, so the file has extension *.twb and then will update accordingly. Here's more information how to do that  https://help.tableau.com/current/pro/desktop/en-us/save_savework_packagedworkbooks.htm#unpackage-a-twbx

0/9000

Hello, 

 

I was recently looking at the topic of Excel export from Salesforce - how to export data generated in the Apex controller as Excel without storing a file in Salesforce. 

If you are interested, step by step guide can be found in this article I've written: 

https://www.aboutsalesforce.com/2025/05/how-to-export-excel-files-from.html

 

 

Happy to hear your comments! 

 

#Microsoft Excel  #LWC  #Salesforce Developer  #Export File

0/9000

Hello,

 

I created a very simple visualforce page with two fields to enter a range of date.

 

It is possible to export the report with the condition of the visualforce in xlsx format?

 

Url Export of report to xlsx with condition

 

https://www.salesforce.com/?pv0=CONDITION1&pv1=CONDITION2&XLSX=1&exp=1&enc=UTF-8&isdtp=p1

 

Thanks,

Sascha

 

#Salesforce Developer

 

@* Salesforce Developers *

3 answers
  1. Oct 5, 2021, 9:16 AM

    Hi @Devendra Patel,

     

    Thanks for your post. 

    It is possible to export the data into a xlsx format? 

    If I change the code into xlsx but unfortunately it is not possible to open the file.

     

    Regards,

    Sascha

0/9000

Hi,  I need to export contact data which are related to the current user into an excel file. This works fine, but now I need the export only for a time range which the user can set at the visual force page. How can I pass the dates (from/to) from the visual force to the apex class?  It is possible to export the data in xlsx format? Currently it is xls format.

 

APEX CLASS

APEX CLASS

public with sharing class ExportToExcel {

public List<Contact> contactlist{get;set;}

public Id currentUserId { get; set;}

public Date datefrom {get;set;}

public Date dateto {get;set;}

public String xlsHeader {

get {

String strHeader = '';

strHeader += '<?xml version="1.0"?>';

strHeader += '<?mso-application progid="Excel.Sheet"?>';

return strHeader;

}

}

public ExportToExcel(){

currentUserId = UserInfo.getUserId();

If(datefrom != Null && dateto != Null) {

Map<Id, Event> relatedEventCon = new Map<Id, Event>([select whoId from Event where activitydate >= :datefrom and activitydate <= :dateto and subject = 'BookingTime AN Termin' and owner.id = :currentUserId]);

Set<Id> eventidsset = new Set<Id>();

for(event relation:relatedEventCon.values()){

eventidsset.add(relation.whoid);

}

contactlist = [select Salutation, Firstname, Lastname, Birthdate, E_Mail_privat__c, Mobiltelefon_privat__c, Account.Name from Contact where Id IN :eventidsset];

}

}

public Pagereference exportAll(){

Date datefrom = datefrom;

Date dateto = dateto;

return new Pagereference('/apex/beratertag3out');

}

}

 

VISUAL FORCE PAGE to set the date range (ExportToExcel)

<apex:page controller="ExportToExcel" docType="html-5.0" id="vfpage">

<apex:form >

<apex:pageBlock >

<apex:pageBlockSection >

<apex:pageBlockSectionItem >

date from: <apex:input type="date" value="{!datefrom}"/>

</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem >

date to: <apex:input type="date" value="{!dateto}"/>

</apex:pageBlockSectionItem>

</apex:pageBlockSection>

</apex:pageBlock>

<apex:pageBlock title="Contacts">

<apex:pageBlockButtons >

<apex:commandbutton value="Export contacts to Excel" action="{!exportAll}"/>

</apex:pageBlockButtons>

</apex:pageBlock>

</apex:form>

</apex:page>

 

VISUAL FORCE PAGE to convert into excel file (berater3out)

<apex:page controller="ExportToExcel" contentType="txt/xml#myTest.xls" cache="true">

<apex:pageBlock >

<apex:pageBlockTable value="{!contactlist}" var="con">

<apex:column value="{!con.Salutation}" headerValue="Anrede"/>

<apex:column value="{!con.Firstname}" headerValue="Vorname" />

<apex:column value="{!con.Lastname}" headerValue="Nachname" />

<apex:column value="{!con.Birthdate}" headerValue="Geburtsdatum" />

<apex:column value="{!con.E_Mail_privat__c}" headerValue="E-Mail-Adresse" />

<apex:column value="{!con.Mobiltelefon_privat__c}" headerValue="Telefonnummer" />

<apex:column value="{!con.Account.Name}" headerValue="Firma" />

</apex:pageBlockTable>

</apex:pageBlock>

</apex:page>

 

Thanks,

Sascha

 

#Salesforce Developer  #Salesforce Development  #Microsoft Excel  #Data Export

5 answers
  1. Sep 23, 2021, 12:20 PM

    ok, I will try to use the xls file, but how can I pass the date from the visual force to the apex controller?

0/9000

Hello SF1 product Team. One of my users is still having issues viewing and opening Microsoft Excel worksheets on his Samsung Galaxy S3 phone. With iPhone, no problem and no issues.

Is there a setting in the Galaxy phone that needs to be changed? SF1 and Android apps are up-to-date.

See attached screenshot.

4 comments
  1. Sep 18, 2015, 4:51 PM
    There are currently only some file preview capabilities supported in Android. Integration with Microsoft office is on the roadmap for next year though and we'll let you open/edit in Office like you can in the iOS version of S1
0/9000

New Version of Salesforce1 for iOS Available Now:

Latest update to the Salesforce1 downloadable app for iOS, version 7.3, is now available for download from the App Store. Highlights of this release include:

• View files from Sharepoint, OneDrive, and Google Drive in Salesforce1

• Edit Microsoft Excel, Word, and PowerPoint files and save back to Salesforce1

• Navigate back easier by edge swiping

@* Customer Success * @* EMEA Success Central * @* Sales Cloud - Getting Started *

Summer '15 - Salesforce1 Enhancements

3 comments
0/9000
Does anybody think that Salesforce will enhance their standard reporting export to the point when it exports into Microsoft Excel with the formatting (alignment, borders, font, etc.) already completed?
10 comments
  1. Jul 13, 2015, 1:27 PM
    From memorey your user profile system permissions need to have API Enabled checked. If you read the doco on Power Query they recommend using a specific view only user/profile for reports so that you dont update date into salesforce by accident (because it will do that as well).
0/9000
Is there a way to request repeat sessions or are these just added when certain sessions fill up? Really hoping for an additional session of "HOT: Enforce Data Quality" as well as "Build Miracles with Microsoft Excel and Salesforce" later in the week for people like me who don't arrive until Monday.
0/9000