Closed sahil-shubham closed 2 weeks ago
Hi @sahil-shubham Thanks for reporting this issue. Could you share us your test code, that will help us repro your issue better. Thanks.
@shanshanzheng-dev Here you go. Thanks for the quick response on the issue.
Let me know if you need anything else from my side.
Hi @sahil-shubham Thanks, I can repro, we'll take a look this and report back if we have a suggestion for you, but unfortunately, we can't share the timeline.
Hi @sahil-shubham, thanks for reporting this issue. I see the base64 string in MAC, Win43 and online are different. But they are all valid to use. You can try it with sample code like "context.workbook.worksheets.getActiveWorksheet().shapes.addImage(mybase64.value)" to have a try.
@XuanZhouMSFT Thank you for the quick reply.
You are right about the image string being valid to the extent that one can add the image back in the sheet. Although I am unable to decode this string to image anywhere else (including making a data URI of it), what image type would this be? And why are the strings different in the first place?
@sahil-shubham Could you help to share what do you want to do with the base64 string? And if possible, could you help to share some sample code about why the base64 string not work in your way? It could help me better understand your problems and provide suggestion.
The main goal is to use the sheet image for doing object detection. Before doing this we load the image and do some resizing operations using node-canvas
, this process works well for when testing on browser but on desktops the resulting data URI formed with the base64 string is unable to load.
To make the data URI, I just append data:image/png;base64,
at the start of the base64 string. It's weird how I am unable to see or load this desktop base64 string anywhere, except in the case when you put it back into the sheet as a shape.
You can see with the two output gists I linked in the issue description, one image is valid to be loaded and another isn't. That is how I came to conclusion of this being an unknown string.
@sahil-shubham Thanks for waiting. I can reproduce your problem locally. Recently we release a fix for this issue. Please help to update your version to be 16.90.24100615 or later, and then try again. Please let me know if your problem still exists.
Updated and tested on the above version, it works. Thank you for your time, this issue can be closed now.
Close this case since the customer confirmed.
Your Environment
Expected behavior
Using the
Range.getImage()
on the above mentioned excel desktop on mac returns an unknown string. Ideally, this should have been a base64 string.Current behavior
The current behaviour results in the following output. The same code running on the excel web returns this instead. I don't see any console errors.
Steps to reproduce
range.getImage()
for say the used rangeContext
Trying to get an image of the excel sheet and identify different table boundaries using a model in the backend.
Useful logs