umya-spreadsheet icon indicating copy to clipboard operation
umya-spreadsheet copied to clipboard

Images with spaces in the file name results in corrupted Excel file

Open Niatross opened this issue 9 months ago • 1 comments

If you attempt to add an image with spaces in the file name it will result in a corrupted Excel file. Upon repair using Excel the image will not be displayed.

Investigating the XML files shows that everything appears to be written correctly and the image is in the xlsx zip.

I cannot find it documented anywhere that spaces are not supported, this was identified through trial and error.

Temporary solution: Don't attempt to add an image which has spaces in the file name

Permanent solution:

  • Return an error if the image name has spaces in it
  • Automatically replace spaces with underscores (as long as it isn't felt that this will cause other problems/confusion with the user trying to enumerate images by name)

Niatross avatar May 07 '25 08:05 Niatross

@Niatross Thank you for your report. We will modify it with reference to the Excel behavior.

MathNya avatar May 09 '25 07:05 MathNya