Sheet to image

Yeap, this works, thanks.

By the way… I was making some more tests with the SheetToImage and I have a question for you.

Is it possible to generate the bmp with aliasing?
You see, I have this OleObjectFrame that contains the table and I’m using the generated bmp to replace the object changed image. But the OOF is not exactly the size of the bmp, so I need to resize it (the bmp) a bit and, as it has no aliasing, the resized result lacks the quality of the original sheet. Can I do this?

Thanks again,
Cruz

By the way, I found other issues in the sheet to image method.

Try this code with the attached files and notice that the bmp is placing data in some cells that should be empty. Be carefull not to open the excel file and save it, or this issue will cease to happen

Workbook book = new Workbook();
book.Open(“c:\test.xls”);

book.Worksheets[0].SheetToImage(“c:\test.bmp”);


And try the same codes but using the test2.xls and test2.bmp. This issue regards hidden rows.

Sorry for all the pressure…
Cruz

Hi,

I don't very understand what you want to do. Does insert the generated bmp to sheet?

You can save image by SheetToImage("c:\\test.emf"). .Emf format file is a vector image that quality is not effect by resizing it.

test1.xls:

Please try the attached fix.

test2.xls:

Hide rows are not rendered. if wants to print, please cancel hide.

Hi Roger, thanks for the reply, that solved my issue! As for the other two issues I pointed out, how are you doing?

Cruz

Hi Cruz,

Sorry to say that I'm not exactly understand what are the other two issues. Could you provide more detail or point out in execl file or image.

Thank you.

Hi again, roger.

That fix you posted solved both issues, thanks! I’ll try not to bother in the near future ;D

Thanks again,
Cruz

Hi again

I found another issue with the SheetToImage method. Please try this code with the attached xls file and notice two things in the resulting bmp:
- first, the text in the merged cells in the first column is not appearing;
- second, the white bottom border still appears even though the pageborders are set to 0.

Workbook book = new Workbook();
book.Open(“c:\test.xls”);
book.Worksheets[0].SheetToImage(“c:\test.bmp”);


Thanks in advance,
Cruz

Hi,

Thanks for providing us the template excel file.

We found the issue after an initial test and will fix it soon.

Thank you.

Hi,

Please try this fix.

Hi Warren,

The issue with the white border is fixed, thanks.

The text in the merged cells now appears but not with the correct aligment. Notice the files attached and you’ll see that the text in the merged cells is left aligned in the sheet but the bmp displays it center aligned.


Thanks again,
Cruz

By the way… I found another bug, but I think this one is related to the StringValue method of the cells. Nevertheless, I post it here with a template workbook.

Notice that the M in “Investment” appears capitalized in the image although it is not capitalized in the sheet.

Thanks in advance,
Cruz

Hi Cruz,

Thanks for the template files,

We found both the issues, we will fix it asap.

Thank you.

Hi there,

Sorry to bug you but I’d like to know if you have some timings for me on these issues? Because my project is scheduled to go to production sometime next week, so… you get the point, right? :stuck_out_tongue:

Thanks agains for your excelent work,
Cruz

Hi,

We will fix both your issue asap as we understand that you are scheduled to go live with your project soon.

Thank you.

Hi,

Please try this fix.

Hi Warren

Yes, the bugs are fixed. Many thanks :slight_smile:

But I found another one (sorry…) Check the attached files and notice that SheetToImage is not supporting row breaks in the cells.

Is this something easy to develop? I would reeeeeeally apreciate if you could fix this for me 'till Wednesday.

Thanks in advance,
Cruz

Hi there! Do you have any updates on the issues stated in the previous posts?

Thanks

Hi,

We found the issue related wrapping text in the cell, we will provide you a fix very soon.

Thank you.

Hi,

Please try the fix in <A href="wlmailhtml:{AF3FBF61-BA42-45F4-88B5-63096A803E39}mid://00000042/!x-usc:</A></P>