Skip to content

Feat/embed image#151

Open
iisyos wants to merge 3 commits intoTheInformationLab:masterfrom
iisyos:feat/embed-image
Open

Feat/embed image#151
iisyos wants to merge 3 commits intoTheInformationLab:masterfrom
iisyos:feat/embed-image

Conversation

@iisyos
Copy link

@iisyos iisyos commented Apr 6, 2025

Overview

This pull request introduces an “Is Image” toggle for columns, enabling the extension to embed images directly into Excel files. If a column is marked as “Is Image,” its content will be fetched and inserted as an actual image in the exported workbook. When no columns are flagged as images, the export will fall back to the default text-based output.

Key Changes

  • Configure.js: Added toggleSheetIsImageHandler to handle image toggling in column settings.
  • SelectColumns/SelectColumns.js and SelectColumns/Sheet/Column.js: Passed and handled the toggleIsImage prop to update the isImage state.
  • func.js:
    • Added ExcelJS for image embedding.
    • Created hasEmbedImage function to detect whether any column requires image export.
    • Implemented logic to fetch and embed images in the resulting Excel file.

How to Test

  1. Install or update the extension in Tableau.
  2. Go to the “SelectColumns” tab.
  3. Check the “Is Image” box for any column containing image URLs.
  4. Export to Excel.
    • Confirm that the images appear directly in the Excel file, rather than as URLs.

Additional Notes

  • If images do not load, ensure that the host server allows CORS requests for the image URLs.
  • ExcelJS may have some limitations or known issues with certain image formats or environments.
  • For columns not marked as “Is Image,” the extension continues to use the existing XLSX approach.

@vercel
Copy link

vercel bot commented Apr 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
Tableau-Extension-ExportAll ❌ Failed (Inspect) Apr 6, 2025 9:07am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant