GitHub user dosubot[bot] added a comment to the discussion: render as html format
<!-- Answer --> This is expected behavior in Superset — the "Render as HTML" option only controls how values are **displayed** in the browser. When you export to Excel/CSV, Superset pulls the raw database query results directly, so your `<span>` tags come through as-is [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/common/query_context_processor.py) [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx). **Workarounds:** 1. **Use a separate metric for export** — Create a version of your metric without the HTML wrapping (just the raw values) and use that when you need to export. 2. **Post-process in Excel** — Use Find & Replace or a formula like `=SUBSTITUTE()` to strip the span tags after export. 3. **Use conditional formatting in the Table chart instead** — If your goal is just coloring, consider using Superset's built-in **Conditional Formatting** feature (under the "Customize" tab in the Table chart). This applies color to cells natively without injecting HTML into the metric values, so exports will contain only clean numeric/text values. Option 3 is the recommended approach if it fits your use case, since it separates styling from data and avoids the export issue entirely. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=46a58b90-a182-489b-b7d7-ac1a6081a952) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) GitHub link: https://github.com/apache/superset/discussions/40044#discussioncomment-16887507 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
