Hello,
We’re currently having some issues regarding the way cells with specific conditional formatting are rendered. These conditional formatting are displayed in the attached cf.png.
Here is the code used to reproduce the issue:
var workbook = new Workbook(@“cf.xlsx”);
<span style="color:blue;">var</span> imageOptions = <span style="color:blue;">new</span> <span style="color:#2b91af;">ImageOrPrintOptions</span>
{
Quality = 100,
VerticalResolution = 200,
HorizontalResolution = 200,
PrintingPage = <span style="color:#2b91af;">PrintingPageType</span>.IgnoreBlank,
ImageFormat = <span style="color:#2b91af;">ImageFormat</span>.Png,
OnePagePerSheet = <span style="color:blue;">true</span>
};
<span style="color:blue;">var</span> worksheet = workbook.Worksheets[0];
<span style="color:blue;">string</span> printArea = <span style="color:blue;">string</span>.Format(<span style="color:#a31515;">"A1:E27"</span>);
worksheet.PageSetup.PrintArea = printArea;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
<span style="color:blue;">var</span> sheetRender = <span style="color:blue;">new</span> <span style="color:#2b91af;">SheetRender</span>(worksheet, imageOptions);
sheetRender.ToImage(0, <span style="color:#a31515;">@"out.png"</span>);</pre>Observing the "out.png" output image, can notice that the conditional formatting is not rendered correctly.<br><br>Thank you,<br>Bogdan Rusu,<br>IBM Romania.<br><br>
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
You are right. I was able to replicate this issue using your code with the latest version:
Aspose.Cells
for .NET v7.3.0.5
We have logged this issue in our database. We will look into this issue and fix the problem. Once the issue is fixed or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-40972.
The issues you have found earlier (filed as CELLSNET-40972) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
Hi! I tried using Aspose Cells 7.3.2.0 and I can see it is partially resolved. Please check the attached images!
Thank you.
Dragos Culea
Hi,
Thanks for your image.
Could you highlight the issues with red circles? Did you mean the blue and purple bars are not present inside the image?
The first image (in.png) is a screenshot of the input workbook. The second image (out.png) is the generated image. I believe the differences are obvious.
Thank you,
Dragos Culea
Hi,
Thanks for your input.
I have added the comment to fix the rendering of conditional formatting (blue and purple) bars issue which looks obvious. Also, I have reopened this issue.
We will look into these issues and fix them and get back to you asap.
Hi,
We have fixed this issue.
Please download and try this fix: Aspose.Cells for .NET v7.3.2.2 and let us know your feedback.
I have attached the output image generated using the following code for your reference.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\cf.xlsx”;
var workbook =
new Workbook(filePath);
var imageOptions =
new ImageOrPrintOptions
{
Quality = 100,
VerticalResolution = 200,
HorizontalResolution = 200,
PrintingPage = PrintingPageType.IgnoreBlank,
ImageFormat = ImageFormat.Png,
OnePagePerSheet =
true
};
var worksheet = workbook.Worksheets[0];
string printArea =
string.Format(“A1:E27”);
worksheet.PageSetup.PrintArea = printArea;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
var sheetRender =
new SheetRender(worksheet, imageOptions);
sheetRender.ToImage(0, filePath + “.
out.png”);
Output Image:
Hi, I have tried the patch you mentioned and the problem is not fixed.
Please reopen and investigate the issue.
Thank you,
Lucian Nistor
Hi,
Thanks for your feedback and using Aspose.Cells
I have tested your file with the latest version: Aspose.Cells
for .NET v7.3.4.1 and did not find any issue.
It seems, your issue occurs with some other file. Please provide us your sample code and the source file to replicate this issue.
We will re-investigate this issue and fix your problem.
I have used the test code as shown in my above post and also attached the output image for your reference.
Output Image:
Hello,
I’ve verified again using the latest version of Aspose.Cells (v7.3.4.1) and the issue not longer reproduces using the attached ‘cf.xlsx’ file from initial post.
I’ve verified also using another excel file, ‘cf2.xlsx’ (please check the attachment), and the issue partially reproduces.
Here is the code used to reproduce:
string filePath = @“C:\Users\IBM_ADMIN\Desktop\cf2.xlsx”;
var workbook = new Workbook(filePath);
var imageOptions = new ImageOrPrintOptions
{
Quality = 100,
VerticalResolution = 200,
HorizontalResolution = 200,
PrintingPage = PrintingPageType.IgnoreBlank,
ImageFormat = ImageFormat.Png,
OnePagePerSheet = true
};
var worksheet = workbook.Worksheets[0];
string printArea = string.Format(“A1:N35”);
worksheet.PageSetup.PrintArea = printArea;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
var sheetRender = new SheetRender(worksheet, imageOptions);
sheetRender.ToImage(0, filePath + “.out.png”);
As you can observe in the output image, cf2.xlsx.out.png’, the columns marked with the red rectangle are not rendered correctly, having no conditional formatting applied to them.
Thank you.
Bogdan Rusu,
IBM Romania.
Hi,
Thanks for the new file and screen shot.
I have noticed the issue again with this new file as you pointed out. I have reopened your existing issue “CELLSNET-40972” again. We will look into it and figure it out soon.
Thank you.
Hi,
Please change the status of the thread to something different from resolved,
Thank you,
Lucian Nistor
Hi,
Thanks for your posting and using Aspose.Cells.
After checking the database, I found, your issue was reopened on 28-Nov and now it is again marked as resolved.
It means, you will get some update in the form of some advice or a fix. In case of fix, it will be available in this week.
I will also discuss your issue with the relevant developer tomorrow.
ibmromania: Hi,
Please change the status of the thread to something different from resolved,
Thank you,
Lucian Nistor
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
We are pleased to let you know that this issue is now fixed. Please download and try the latest version:
Aspose.Cells
for .NET v7.3.4.3 and let us know your feedback.
I have also attached the output png generated by the following code for your reference.
As you can see in the output image, issue does not occur.
C#
string filePath = @"F:\Shak-Data-RW\Downloads\cf2.xlsx";
var workbook = new Workbook(filePath);
var imageOptions = new ImageOrPrintOptions
{
Quality = 100,
VerticalResolution = 200,
HorizontalResolution = 200,
PrintingPage = PrintingPageType.IgnoreBlank,
ImageFormat = ImageFormat.Png,
OnePagePerSheet = true
};
var worksheet = workbook.Worksheets[0];
string printArea = string.Format("A1:N35");
worksheet.PageSetup.PrintArea = printArea;
worksheet.PageSetup.TopMargin = 0;
worksheet.PageSetup.LeftMargin = 0;
worksheet.PageSetup.RightMargin = 0;
worksheet.PageSetup.BottomMargin = 0;
var sheetRender = new SheetRender(worksheet, imageOptions);
sheetRender.ToImage(0, filePath + ".out.png");
Output Image: