New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workbook with 'in_memory':True doesn't write images to StringIO based output #102

Closed
netnichols opened this Issue Jan 27, 2014 · 6 comments

Comments

3 participants
@netnichols

I am generating xlsx files server side and was therefore using StringIO as the output with {'in_memory':True} as a workbook option.

I then tried to insert an image into the xlsx, and this appeared to work (no errors were thrown), but the resulting xlsx was far too small and the image wasn't displayed in Excel.

Eventually I tried removing the 'in_memory' option, and this fixed the issue. This is an acceptable workaround for my case. It would be great if 'in_memory' could support images, but if that would be a difficult job then perhaps just a note in the documentation would be beneficial to others trying to do the same thing.

Thanks!

@ghost ghost assigned jmcnamara Jan 27, 2014

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Jan 27, 2014

Owner

Hi Jeff,

Thanks for that.

That is a bug, I'll look into it.

John

Owner

jmcnamara commented Jan 27, 2014

Hi Jeff,

Thanks for that.

That is a bug, I'll look into it.

John

jmcnamara added a commit that referenced this issue Jan 27, 2014

Fix for insert_image() issue in 'in_memory' mode.
Fix for missing images in in_memory' mode. Issue #102.
@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Jan 27, 2014

Owner

Hi Jeff,

I've pushed a fix for this issue with a test to the master branch. If you get a chance you can try it out.

Thanks for the report.

John.

Owner

jmcnamara commented Jan 27, 2014

Hi Jeff,

I've pushed a fix for this issue with a test to the master branch. If you get a chance you can try it out.

Thanks for the report.

John.

@netnichols

This comment has been minimized.

Show comment
Hide comment
@netnichols

netnichols Jan 28, 2014

Wow, that was quick for what looks to have been a not entirely trivial fix. I'm on some tight deadlines so I won't be able to test that fix out now, but I'll give it a shot as soon as I have a chance.

Thanks!

Wow, that was quick for what looks to have been a not entirely trivial fix. I'm on some tight deadlines so I won't be able to test that fix out now, but I'll give it a shot as soon as I have a chance.

Thanks!

@anywhim

This comment has been minimized.

Show comment
Hide comment
@anywhim

anywhim Feb 4, 2014

Hi John,
Same issue still doesn't works. Even if I don't use StringIO. Also there are some other issues. Image inserted with scaling by default, I use {'x_scale': 0.64, 'y_scale': 0.64} that fits to real size. If 'constant_memory': True and row is empty I can't set up height by set_row().

anywhim commented Feb 4, 2014

Hi John,
Same issue still doesn't works. Even if I don't use StringIO. Also there are some other issues. Image inserted with scaling by default, I use {'x_scale': 0.64, 'y_scale': 0.64} that fits to real size. If 'constant_memory': True and row is empty I can't set up height by set_row().

@anywhim

This comment has been minimized.

Show comment
Hide comment
@anywhim

anywhim Feb 4, 2014

I'm sorry, your fix works for original issue!

anywhim commented Feb 4, 2014

I'm sorry, your fix works for original issue!

@jmcnamara jmcnamara added the fixed label Feb 20, 2014

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Feb 20, 2014

Owner

This issue is now fixed in version 0.5.3.

Thanks for the input,

John

Owner

jmcnamara commented Feb 20, 2014

This issue is now fixed in version 0.5.3.

Thanks for the input,

John

@jmcnamara jmcnamara closed this Feb 20, 2014

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