Using template xlsx Can not display the image when download the report
-
The lmage show in jsreportonline but report download the image not display.
In jsreportonline studio:
The image
Downloaded report:
-
Please share a minimal playground demo (just with the image)
https://playground.jsreport.net/
-
Hi, the example:
-
This works for me... Maybe it's some security settings of your desktop Excel, to not load images, when the file comes from the internet.
-
Hi, I´m sorry,
I have updated the example data where the image is received as base64, please check again!
-
Still, the image displays just fine for me in the desktop excel on windows.
-
Sorry, The sample data had not been updated, please check again!
data field logo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIsAAAAtCAYAAACeXJgMAAAAAXNSR0IArs4c6QAAF7BJREFUeF7tXHdYVNfTfs+FpahYUBFs2AICFtRYwN67xhJj771Eo8beY+yKlahR1MRCoinGrokidsXeFSsW7CWissA93zPn7nLvLruwGMjz5Sfzj+y9Z06Z896ZOTNzZO92uHBkUIYEbJAAywCLDVLKaCIkkAGWDCDYLIEPA4udM6TsFSHlCADLVATMuSBg56wMGvcC8pNdiL8dbPMkMhr+NySQKrAwl5Kw9+wDO49WgF1mqyvUH28C+Xl4mkggNg5Yt5dhz0mG+885nBwYfAtydKrNUe4Ty0Pcf8oQshs4fhV4FQNkzQR86gX0qM9RILdlnscvgZW7GI5cAl7GAC7ODOW9OLrX5yjoZpnn8l2GNX8CZ28yxLznyJUVqF4S6FafizEt0YmrwLp9DMT7Ts/hkYOhpj9H5zocmRxNOeb9wvD8b+VZATegTyPFvdx+nCHiumnbkW04HHXKsxsPFZkR2dsBY9qauqUx74E1exjCzjJEv+RwdmAoWZijY20O/yLWt80msDBdNth7T4Vdvk4Ak5IFgfxsP/QnmqYJUEhQrb5huHBbWbiWGAPGtuUY3MJUEH+eAXrMlfA2NukUnByA5YM5GpY35Tl2haH9DIbXby3zrPiKo345Ux7ajGHLGRLkpDzurhwbxwLFC5jyfBvKMP/XpGuhHgiQv4yXUSiP2t+nAyXceaz8LlsM2DVNGWz490xstpa2fSOjgrfyZO9Z4ItvlX0iAN1bp07y7mOgxRQJ9K8lmU7qyNG/qeU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qnGsWSgbSejlMBy+mQEJo4agYqBlXHmZASmzp6Htp81QYeu3YVzW6d+A9StUgl16jdEcT8/rP5+OfoOGoyGTZoKQQ4ePhIhy4IRvHI1bkRGgswQaR63PHkQWK16IliqlC2Nzj16gb7Q8pUCEFilKhYHzUX7Ll2Fj0Om6eDJs/iieRP4+PkJx/XWzRvY+leYMIeWwNJn4CDUr1pZbCBplk99vdG9T18c3B8mQEjmrEXDesKRJUe1Ru06wvneuW0rsmTJguyurpgyY1YSM/R5u/Y4fvQIZsxbINZIwCDwDRs1Rmjc337+CW07dUH0wwcI+3MPqtWqLTSvJUq1z6IrEQy7/B2Tx4n8Hgn31yLu8khAtlxS+fAZw+YjQJ/G1qOD5oOkBBbaqIVzZomNJrXrmtMVS+YHiW7IH+jYtTuiHz7EyqXBeBQdLWy10Szs3bMLv2/ciPIBAcJxvHDuLG7duIFy5Stg86+bQP7Bnh070LZTZyyaO1v0SRv7edv22Ltnt9isigGB4vn6H1aLv8P37RXj0EmMNs0tj3vikjZuWA/fEiXw5PFjODo6IqBKVUQcO4qbkZFo1qo15s+aIdrSiadN+w7CB7px/ZowF9TPkBGjBDCnTZqAOL0ew8eMRa7cbgLQ5JCT1tu59Q+069xVzLf3wEEInh+EDl27Ye/uXejaq4/onz4wOgHmcHUVpplo0jRlbHNKHVjsMytxFUuBsYS3kGOuI+Hhr0i4s9gqSFLSRsm9l7KXh+Te4p90kcH7TyQQ/wbxkdNMerAeZ2EOkHJUAHPKJ6rhqEqOv72l/Gc9hhqWfzKXDN7/ngRsDsr995aWMeO0lkAGWNJaov/D/WWA5X94c9N6af8HrBEWo7PXs9gAAAAASUVORK5CYII="
-
The
xlsxAddImage
expects a base64 encoded image, not a data URI. In other words you need to remove thedata:image/png;base64,
prefix.