Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
pyskaty
Frequent Visitor

Export to excel with RLS and USERCULTURE (power bi embedded)

Hi guys,

I have a strange problem with passing culture to "export to excel" function in power bi embedded scenario.

 

Environment: 

Report published to service and displayed on my web using embed scenario. I'm using RLS (one of rules uses USERCULTURE() to filter some data). I'm passing culture when embedding report in JavaScript

const config: any = {
      type: 'report',
      tokenType: pbi.models.TokenType.Embed,
      accessToken: accessToken.token,
      embedUrl: accessToken.embedUrl,
      pageView: 'fitToWidth',
      id: accessToken.reportId,
      permissions: pbi.models.Permissions.All,
      filters,
      settings: {
        filterPaneEnabled: false,
        navContentPaneEnabled: false,
        background: pbi.models.BackgroundType.Transparent,
        localeSettings: {
          language: this.userSettings.language,  // en, es, ...
          formatLocale: this.userSettings.language,
        }
      },
    };

return new pbi.service.Service(pbi.factories.hpmFactory,
      pbi.factories.wpmpFactory, pbi.factories.routerFactory)
      .embed(element, config) as Report;


Everything work fine until user try to export data to excel (using context menu on visual). Then culture is always set to 'en-US' regarding user's locale and sent config. 

 

Is there any way to configure "export to excel" to use given culture and not default one? Thanks in advance. 

 

3 REPLIES 3
Julien1983
New Member

Hello, 

We have the same problem.

Have you found a solution or created a ticket for this bug?

Regards

Anonymous
Not applicable

Hi @pyskaty 

I didnt embed report in JavaScript like you did, so I dont quite understand the result you provided .

In Power BI service , we set the language in Settings, and there seems to be no language setting for export data in visual .

Ailsa-msft_0-1621586653240.png

Maybe you can try to change the language setting in the Settings, and then look at the result ?

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous 

Setting static language in power bi servcie oraz report will not resolve my problem. I have multi language environment where users use different cultures (en-US, pl-PL and so on). I pass culture as parameter when embedding report in my app and it works - except 'export to excel' - where culture is alwasy set to en-US.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors