Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Jun 01, 2012 4:49 pm

I am using this method to save an image as a stream. However, it distorts the worksheet, first by having no margins on the the left side of the image and it also makes the image smaller than it should be.

Here's the code I'm using:

Code: Select all
ws.SaveToImage(1,1,37,25)
    .Save(mStream, ImageFormat.Png);


I would rather have it save the whole worksheet (ws) to the stream, but it appears that doesn't work very well.

Please tell me if there's a better way to do this.

Thanks,

Stephen

swagner
 
Posts: 1
Joined: Thu May 31, 2012 8:50 pm

Tue Jun 05, 2012 2:53 am

Hi Stephen,

Thanks for evaluating Spire.Xls.

We've tested the issue you reported with the Spire.Xls v 6.5.9, but we can't reproduce it. I attached the demo ,please have a check. If you still have this problem, could you please offer more code and the original file to help us reproduce this problem? Thanks for your understanding and cooperation.


Have a great day!
Attachments
XlsToImage.zip
(31.02 KiB) Downloaded 556 times
User avatar

Suvi.Wu
 
Posts: 154
Joined: Thu Oct 20, 2011 2:53 am

Return to Spire.XLS

cron