Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-04-30 Thread via GitHub


imad-hl commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4351650295

   I ran into the same issue when using a custom D3_FORMAT.  (Superset v6.0.0)
   Here is my configuration:
   ```
   D3_FORMAT = {
   "decimal": ",",
   "thousands": " ",
   "grouping": [3],
   "currency": ["€", ""],
   }
   ```
   some numeric cells were converted into dates in Excel, while others lost 
their decimal separator and were exported as plain integers
   
   https://github.com/user-attachments/assets/4ab152ec-d7f4-43cc-b013-bf3cca4c9521";
 />
   
   
   For now, the only stable workaround I found is to **revert to the default 
D3_FORMAT** config, since it restores consistent numeric exports


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-17 Thread via GitHub


fowlerp397-tech commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4073753059

Trying to reproduce this on my side
   
   On Mon, Mar 16, 2026, 12:10 PM Evan Rusackas ***@***.***>
   wrote:
   
   > *rusackas* left a comment (apache/superset#38555)
   > 
   >
   > We'll hope that someone picks this up as a volunteer effort, but you're
   > quite welcome to check out the repo locally so you DO have the frontend
   > available to modify. We're very much open to a PR that fixes things
   > (without hardcoding Spanish number formats, but rather being a more
   > generalized solution).
   >
   > —
   > Reply to this email directly, view it on GitHub
   > ,
   > or unsubscribe
   > 

   > .
   > You are receiving this because you are subscribed to this thread.Message
   > ID: ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-16 Thread via GitHub


rusackas commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4069247603

   We'll hope that someone picks this up as a volunteer effort, but you're 
quite welcome to check out the repo locally so you DO have the frontend 
available to modify. We're very much open to a PR that fixes things (without 
hardcoding Spanish number formats, but rather being a more generalized 
solution). 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-10 Thread via GitHub


carlosaran667 commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4031161245

   Since I cannot modify the frontend in my installation, I don't think I can 
go much further on my side.
   
   If anyone wants to take it from here, I would be happy to provide any 
additional context that may help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-10 Thread via GitHub


dosubot[bot] commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4031112058

   
   That explains it! The **"Export to Pivoted Excel" feature runs entirely in 
the browser** - it doesn't go through the Python backend at all.
   
   Based on [PR #33569](https://github.com/apache/superset/pull/33569), this 
feature:
   1. Uses the **SheetJS (xlsx) JavaScript library** in the browser
   2. Reads the **rendered HTML pivot table directly from the DOM** (the 
`.pvtTable` element you see on screen)
   3. Converts it to Excel using `XLSX.utils.table_to_book()` client-side
   4. Downloads the file directly without any API calls
   
   **This is why modifying `superset/utils/excel.py` has no effect** - that 
code is never executed for pivoted Excel exports.
   
   To customize the number formatting for pivoted Excel exports, you'd need to 
modify the frontend JavaScript code. The relevant file would be something like 
`downloadAsPivotExcel.ts` in the superset-frontend directory. You can verify 
this is what's happening by:
   1. Opening browser DevTools (F12) → Network tab
   2. Clicking "Export to Pivoted Excel"
   3. You should see **no network request** to the backend - it's all happening 
client-side
   
   If you want to fix the formatting, the approach would be to find where 
SheetJS generates the Excel file in the frontend code and configure the number 
format there. Would you like me to help trace the exact frontend code location?
   
   
   
   *To reply, just mention 
[@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
   
   ---
   How did I do? 
[Good](https://app.dosu.dev/response-feedback/a6a0b31e-764b-46db-8da1-a6d6053fbc9c?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/a6a0b31e-764b-46db-8da1-a6d6053fbc9c?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/a6a0b31e-764b-46db-8da1-a6d6053fbc9c?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/a6a0b31e-764b-46db-8da1-a6d6053fbc9c?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose)
 | [Hallucination](https://app.dosu.dev/response-feedback/a6a0b31e-764b
 
-46db-8da1-a6d6053fbc9c?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/a6a0b31e-764b-46db-8da1-a6d6053fbc9c?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/a6a0b31e-764b-46db-8da1-a6d6053fbc9c?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge)Ā [![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=That%20explains%20it%21%20The%20%2A%2A%22Export%20to%20Pivoted%20Excel%22%20feature%20runs%20entirely%20in%20the%20browser%2A%2A%20-%20it%20doesn%27t%20go%20through%20the%20Python%20backend%20at%20all.%0A%0ABased%20on%20%5BPR%20%2333569%5D%28https%3A//github.com/apache/superset/pull/33569%29%2C%20this%20feature%3A%0A1.%20Uses%20the%20%2A%2ASheetJS%20%28xlsx%29%20JavaScript%20library%2A%2A%20in%20the%20browser%0A2.%20Reads%20the%20%2A%2Arendered%20HTML%20pivot%20table%20directly%20from%20the%20DOM%2A%2A%20%28the%20%60.pvtTable%60%20element%20you%20see%20on%20screen%29%0A3.%20Converts%20it%20to%20Excel%20using%20%60XLSX.utils.table_to_book%28%29%60%20client-side%0A4.%20Downlo
 
ads%20the%20file%20directly%20without%20any%20API%20calls%0A%0A%2A%2AThis%20is%20why%20modifying%20%60superset/utils/excel.py%60%20has%20no%20effect%2A%2A%20-%20that%20code%20is%20never%20executed%20for%20pivoted%20Excel%20exports.%0A%0ATo%20customize%20the%20number%20formatting%20for%20pivoted%20Excel%20exports%2C%20you%27d%20need%20to%20modify%20the%20frontend%20JavaScript%20code.%20The%20relevant%20file%20would%20be%20something%20like%20%60downloadAsPivotExcel.ts%60%20in%20the%20superset-frontend%20directory.%20You%20can%20verify%20this%20is%20what%27s%20happening%20by%3A%0A1.%20Opening%20browser%20DevTools%20%28F12%29%20%E2%86%92%20Network%20tab%0A2.%20Clicking%20%22Export%20to%20Pivoted%20Excel%22%0A3.%20You%20s

Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-10 Thread via GitHub


carlosaran667 commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4030974858

   Yeah, as I thought, excel.py is used on "Export to Excel", but not on the 
"Export to pivoted Excel" button.
   @dosu can you check what does the button "Export to pivoted Excel" actually 
executes?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-10 Thread via GitHub


dosubot[bot] commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4030313252

   
   I found an important issue - looking at the actual [`excel.py` 
source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/excel.py#L43-L53),
 the sheet name is `"Sheet 1"` (with a space), not `'Sheet1'`. My earlier 
suggestion was wrong.
   
   Let's add logging to verify your changes are being executed. Update your 
`df_to_excel()` function in `superset/utils/excel.py`:
   
   ```python
   import logging  # Add at top of file if not present
   
   logger = logging.getLogger(__name__)
   
   def df_to_excel(df: pd.DataFrame, **kwargs: Any) -> Any:
   logger.warning("=== df_to_excel called ===")  # Using warning so it 
shows regardless of log level
   logger.warning("DataFrame shape: %s, columns: %s", df.shape, 
list(df.columns))
   
   output = io.BytesIO()
   df = quote_formulas(df)
   
   with pd.ExcelWriter(output, engine="xlsxwriter") as writer:
   df.to_excel(writer, **kwargs)
   
   workbook = writer.book
   worksheet = writer.sheets["Sheet 1"]  # Note: "Sheet 1" with space!
   
   spanish_format = workbook.add_format({
   'num_format': '#.##0,00'
   })
   
   numeric_cols = df.select_dtypes(include=['float64', 'int64', 
'float32', 'int32']).columns
   logger.warning("Numeric columns found: %s", list(numeric_cols))
   
   for col_idx, col_name in enumerate(df.columns):
   if col_name in numeric_cols:
   excel_col_idx = col_idx + 1 if kwargs.get('index', True) 
else col_idx
   from xlsxwriter.utility import xl_col_to_name
   col_letter = xl_col_to_name(excel_col_idx)
   worksheet.set_column(f'{col_letter}:{col_letter}', None, 
spanish_format)
   logger.warning("Applied Spanish format to column %s (%s)", 
col_name, col_letter)
   
   logger.warning("=== Excel generation complete ===")
   return output.getvalue()
   ```
   
   After restarting Superset:
   1. Perform the export and check your server logs for the `=== df_to_excel 
called ===` messages
   2. If you **don't** see these log messages, the code isn't being reached 
(might be caching or a different export path)
   3. If you **do** see them but no formatting change, let me know what the 
logs say about numeric columns
   
   Also, make sure to fully restart Superset (not just reload) after making 
changes.
   
   
   
   *To reply, just mention 
[@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
   
   ---
   How did I do? 
[Good](https://app.dosu.dev/response-feedback/d8788476-7e04-42fa-a32a-543839aec25c?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/d8788476-7e04-42fa-a32a-543839aec25c?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/d8788476-7e04-42fa-a32a-543839aec25c?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/d8788476-7e04-42fa-a32a-543839aec25c?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose)
 | [Hallucination](https://app.dosu.dev/response-feedback/d8788476-7e04
 
-42fa-a32a-543839aec25c?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/d8788476-7e04-42fa-a32a-543839aec25c?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/d8788476-7e04-42fa-a32a-543839aec25c?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge)Ā [![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=I%20found%20an%20important%20issue%20-%20looking%20at%20the%20actual%20%5B%60excel.py%60%20source%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/excel.py%23L43-L53%29%2C%20the%20sheet%20name%20is%20%60%22Sheet%201%22%60%20%28with%2

Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-10 Thread via GitHub


carlosaran667 commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4030258095

   @dosu nothing changed. It didn't throw any error either.
   Maybe we can add some log messages to check what's actually going on or try 
something else.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-10 Thread via GitHub


dosubot[bot] commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4030027483

   
   Here's how to modify 
[`superset/utils/excel.py`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/excel.py#L43-L53)
 to hardcode Spanish number formatting:
   
   **Current code (lines 43-53):**
   ```python
   def df_to_excel(df: pd.DataFrame, **kwargs: Any) -> Any:
   output = io.BytesIO()
   df = quote_formulas(df)
   with pd.ExcelWriter(output, engine="xlsxwriter") as writer:
   df.to_excel(writer, **kwargs)
   return output.getvalue()
   ```
   
   **Replace with:**
   ```python
   def df_to_excel(df: pd.DataFrame, **kwargs: Any) -> Any:
   output = io.BytesIO()
   df = quote_formulas(df)
   
   with pd.ExcelWriter(output, engine="xlsxwriter") as writer:
   df.to_excel(writer, **kwargs)
   
   # Access xlsxwriter objects for custom formatting
   workbook = writer.book
   worksheet = writer.sheets['Sheet1']
   
   # Spanish format: period for thousands, comma for decimal
   spanish_format = workbook.add_format({
   'num_format': '#.##0,00'
   })
   
   # Apply to numeric columns
   numeric_cols = df.select_dtypes(include=['float64', 'int64', 
'float32', 'int32']).columns
   for col_idx, col_name in enumerate(df.columns):
   if col_name in numeric_cols:
   # +1 offset because pandas writes index as first column by 
default
   excel_col_idx = col_idx + 1 if kwargs.get('index', True) 
else col_idx
   from xlsxwriter.utility import xl_col_to_name
   col_letter = xl_col_to_name(excel_col_idx)
   worksheet.set_column(f'{col_letter}:{col_letter}', None, 
spanish_format)
   
   return output.getvalue()
   ```
   
   **Key points:**
   - The format string `'#.##0,00'` uses period for thousands and comma for 
decimals (Spanish style)
   - Access the workbook/worksheet **after** `df.to_excel()` writes the data
   - The `+1` offset accounts for pandas writing the DataFrame index as column 
A by default
   
   After modifying, restart Superset and test the export. Let me know if you 
hit any issues!
   
   
   
   *To reply, just mention 
[@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
   
   ---
   How did I do? 
[Good](https://app.dosu.dev/response-feedback/b1f2a247-76c1-4262-829e-18fe6ab711ca?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/b1f2a247-76c1-4262-829e-18fe6ab711ca?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/b1f2a247-76c1-4262-829e-18fe6ab711ca?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/b1f2a247-76c1-4262-829e-18fe6ab711ca?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose)
 | [Hallucination](https://app.dosu.dev/response-feedback/b1f2a247-76c1
 
-4262-829e-18fe6ab711ca?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/b1f2a247-76c1-4262-829e-18fe6ab711ca?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b1f2a247-76c1-4262-829e-18fe6ab711ca?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge)Ā [![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Here%27s%20how%20to%20modify%20%5B%60superset/utils/excel.py%60%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/excel.py%23L43-L53%29%20to%20hardcode%20Spanish%20number%20formatting%3A%0A%0A%2A%2ACurrent%20code%20%28lines%2043-53%29%3A%2A%2A%0A%60%60%60python%0Adef%20df_to_excel%28df%3A%20pd.DataFrame%2C%20%2A%2Akwargs%3A%20Any%29%20-%3E%20Any%3A%0A%20%20%20%20output%20%3D%20io.BytesIO%28%29%0A%20%20%20%20df%20%3D%20quote_formulas%28df%29%0A%20%20%20%20with%20pd.ExcelWriter%28output%2C%20engi

Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-10 Thread via GitHub


carlosaran667 commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4029974962

   @dosu Since it's my first time working on Superset's backend files (other 
than config.py), walk me through what I should try to change in utils/excel.py.
   Let's start simple by hard-coding my D3_FORMAT directly, not reading it from 
the config file.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [I] Export to pivoted Excel inconsistent formatting [superset]

2026-03-10 Thread via GitHub


dosubot[bot] commented on issue #38555:
URL: https://github.com/apache/superset/issues/38555#issuecomment-4029868398

   
   Hi @carlosaran667! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping 
the superset team.
   
   
   This is a **known architectural limitation** in Superset. [D3_FORMAT only 
affects frontend UI rendering and does not apply to CSV/Excel 
exports](https://github.com/apache/superset/discussions/34568).
   
   **Why percentages/currency work but plain numbers don't:** Percentages and 
currency appear to be pre-formatted in the frontend before being sent to the 
export pipeline, while plain decimal numbers are sent as raw values and rely on 
the [Excel export 
logic](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/excel.py#L43-L53),
 which uses pandas' `to_excel()` method without custom number formatting.
   
   **Why `EXCEL_EXPORT` doesn't help:** This config only passes arguments to 
pandas' `to_excel()` method, which doesn't have parameters for locale-specific 
number formatting like D3_FORMAT provides.
   
   **Related developments:**
   - [PR #38170](https://github.com/apache/superset/pull/38170) fixes CSV 
decimal separator issues but **does not address Excel exports**
   - [Issue #35524](https://github.com/apache/superset/issues/35524) tracks a 
related D3_FORMAT regression in 6.0.0-RC2
   
   **Workarounds (limited):**
   1. Post-process exported files using external tools (openpyxl, Excel macros)
   2. Use CSV export instead (once PR #38170 is merged) and import into Excel 
with correct locale settings
   3. Code modification: Patch 
[`superset/utils/excel.py`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/utils/excel.py#L43-L53)
 to access xlsxwriter's formatting API and apply custom number formats based on 
D3_FORMAT
   
   This would require mapping D3 format patterns to Excel number format codes 
and applying them via `workbook.add_format()` - a non-trivial change that isn't 
currently on the roadmap.
   
   
   
   *To reply, just mention 
[@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
   
   ---
   How did I do? 
[Good](https://app.dosu.dev/response-feedback/f7cc4a6d-eb44-4ea2-98a4-a96ddcf25007?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/f7cc4a6d-eb44-4ea2-98a4-a96ddcf25007?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/f7cc4a6d-eb44-4ea2-98a4-a96ddcf25007?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/f7cc4a6d-eb44-4ea2-98a4-a96ddcf25007?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose)
 | [Hallucination](https://app.dosu.dev/response-feedback/f7cc4a6d-eb44
 
-4ea2-98a4-a96ddcf25007?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/f7cc4a6d-eb44-4ea2-98a4-a96ddcf25007?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/f7cc4a6d-eb44-4ea2-98a4-a96ddcf25007?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge)Ā [![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20%2A%2Aknown%20architectural%20limitation%2A%2A%20in%20Superset.%20%5BD3_FORMAT%20only%20affects%20frontend%20UI%20rendering%20and%20does%20not%20apply%20to%20CSV/Excel%20exports%5D%28https%3A//github.com/apache/superset/discussions/34568%29.%0A%0A%2A%2AWhy%20percentages/currency%20work%20but%20plain%20numbers%20don%27t%3A%2A%2A%20Percentages%20and%20currency%20appear%20to%20be%20pre-formatted%20in%20the%20frontend%20before%20being%20sent%20to%20the%20export%20pipeline%2C%20while%20plain%20decimal%20numbers%20are%20sent%20as%20raw%20values%20and%20rely%20on%20the%20%5BExcel%20export%20logic%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1e
 
d3b063ffe45377799c/superset/utils/excel.py%23L43-L53%29%2C%20which%20uses%20pandas%27%20%60to_excel%28%29%60%20method%20without%20custom%20number%20formatt