Hi:
Using the aspose api, how can I read what icon was used in the formatting of a cell with conditional formatting that uses Icon Sets (i.e. the icon that displayed in the cell as a result of the conditional formatting evaluation)? I attached a spreadsheet that has quite a few cells with this kind of formatting, perhaps you can post a sample.
Also is it possible to export the icon to an image? I noticed that the export to pdf includes such an icon, however the export to html doesn’t.
Thank you
Hi,
Hi,
Could you please tell me where this is at?
Thank you
Hi,
Sounds great! Thank you
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Please download and try this fix: Aspose.Cells for .NET v7.4.3.2 with the following code.
C#
Workbook workbook = new Workbook(@“D:\Shapes\user\2007\Testoutput.xlsx”);
Worksheet sheet = workbook.Worksheets[0];
Cell cell=sheet.Cells[“A1”];
ConditionalFormattingResult cfr = cell.GetConditionalFormattingResult();
ConditionalFormattingIcon icon = cfr.ConditionalFormattingIcon;
File.WriteAllBytes(“c:\2.jpg”,icon.ImageData);
Thank you!
I just noticed that the icons generated by aspose are slightly different than the ones in Excel. Just as an example, the oblique arrow pointing up. N10.jpg is the one generated using Aspose and arrow.png is a screenshot of excel. But I don’t think it is a problem.
Would it be possible to generate gif files with transparent backgrounds instead of jpg?
Thanks again!
I used this code:
System.Drawing.Image image1 = System.Drawing.Image.FromStream(new MemoryStream(icon.ImageData));
File.WriteAllBytes(String.Format(@“c:\temp{0}.jpg”, cellName), icon.ImageData);
image1.Save(String.Format(@“c:\temp{0}.gif”, cellName), ImageFormat.Gif);
image1.Save(String.Format(@“c:\temp{0}_1.jpg”, cellName), ImageFormat.Jpeg);
but the saved image doesn’t look very good.
See the attachments. N11.jpg is the one generated using aspose.
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
We have generated the image of cell N11 and found that it is generated fine. Please see the following code and the attached generated image. If you encounter any issue, please provide us your runnable sample code to look into this issue.
C#
Workbook workbook = new Workbook(@“F:\Shak-Data-RW\Downloads\Testoutput.xlsx”);
Worksheet sheet = workbook.Worksheets[0];
Cell cell = sheet.Cells[“N11”];
ConditionalFormattingResult cfr = cell.GetConditionalFormattingResult();
ConditionalFormattingIcon icon = cfr.ConditionalFormattingIcon;
File.WriteAllBytes(@“F:\Shak-Data-RW\Downloads\N11.jpg”, icon.ImageData);
The issues you have found earlier (filed as CELLSNET-41605) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.