Hi
I am using Aspose.cells. i try to apply a two color gradient fill to some cells in my worksheet.
This is my code :
Workbook wbd= new Workbook(FileFormatType.Xlsx);
Cell cella4= wbd.Worksheets[0].Cells[“A4”];
Cell cella5 = wbd.Worksheets[0].Cells[“A5”];
Cell cella6 = wbd.Worksheets[0].Cells[“A6”];
Style a4 = new Style();
Style a5 = new Style();
Style a6 = new Style();
a4.SetTwoColorGradient(System.Drawing.Color.Indigo, System.Drawing.Color.White, Aspose.Cells.Drawing.GradientStyleType.Horizontal, 1);
a5.SetTwoColorGradient(System.Drawing.Color.Black, System.Drawing.Color.White, Aspose.Cells.Drawing.GradientStyleType.Horizontal, 1);
a6.SetTwoColorGradient(System.Drawing.Color.Yellow, System.Drawing.Color.BlueViolet, Aspose.Cells.Drawing.GradientStyleType.Horizontal, 1);
cella4.SetStyle(a4);
cella5.SetStyle(a5);
cella6.SetStyle(a6);
wbd.Save(“C:\Users\Arsha\Desktop\destination.xlsx”);
When i see the destination file the cells a4,a5,a6 are filled with same color of style a4. style a5 & a6 are not applied to cells a5 & a6. Please Help.
Regards
Abdul R Sha
Hi Abdul,
The issues you have found earlier (filed as CELLSNET-30020) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi,
Thanks for resolving the issue. We are in plan to acquire license for Aspose.cells but before that we have some issues which we are stuck up with , the issues are listed below :
1) when we convert a Excel sheet into image (Tiff format) , The conditional formats are not copied. For example the particular cell has conditional format - icon sets of up, side, down arrows as conditional formats. when we try to convert to image its values are only copied and not conditional format images.
2)A particular cell contains 7 different conditional formats with gradient colors.when i try to copy this sheet to another workbook . After copying the entire sheet, the cell has only two different gradient colors repeating for all the 7 different conditions.
3)Currently we can paste an image into a cell referring to a particular cell location for ex : (0,0) or (5,4). can we paste the image to a location starting from the middle of fifth column(4.5) because the location of cell is in integer so we are unable to give decimal values to its positions.
4) In future if u have Updated the dll. do we need to replace the entire dll or will u provide update patches as an alternative ?
These are the main issues and clarifications we need to know at this point of time. If u need more inputs on this issue probably i can provide u with the sample code and sample excel file with which i found this issue. once again thanks for resolving the previous issue.
Thanks ,
Abdul R Sha.
Hi,
Hi Amjad,
1) This is the sample code for Converting sheet to images. . But the conditonal formats are not converted to images. Have Attached the sample File Template1.xlsx and output image file sheetimage1.tiff in zip format
Aspose.Cells.Workbook book = new Aspose.Cells.Workbook("C:\\Template1.xlsx");
//Workbook book = new Workbook("C:\\Testbook.xls");
//Get the first worksheet.
//Worksheet sheet = book.Worksheets[0];
Aspose.Cells.Worksheet sheet;
Aspose.Cells.Rendering.ImageOrPrintOptions imgOptions;
Aspose.Cells.Rendering.SheetRender sr;
for (int i = 0; i < book.Worksheets.Count; i++)
{
sheet = book.Worksheets[0];// Considering the first sheet to convert to images
imgOptions = new Aspose.Cells.Rendering.ImageOrPrintOptions();
//Specify the image format
if (i != 0)
{
imgOptions.HorizontalResolution = 150;
imgOptions.VerticalResolution = 150;
}
imgOptions.OnePagePerSheet = true;
imgOptions.IsImageFitToPage = false;
imgOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff;
sr = new Aspose.Cells.Rendering.SheetRender(sheet, imgOptions);
sr.ToImage(0, "C:\\sheetimage" + i + ".tiff");
}
2) This is the sample code for second issue. .
Workbook wbd = new Workbook("C:\\Template2.xlsx");
Workbook wbd1 = new Workbook(FileFormatType.Xlsx);
wbd1.Worksheets.Add("Template2");
wbd1.Worksheets["Template2"].Copy(wbd.Worksheets[0]);
wbd1.Save("C:\\Template2dest.xlsx");
In the output excel even though i change the value in cell I3 the correct colors are not reflected.
I have attached input excel : Template2.xlsx & outputExcel : Template2dest.xlsx .
3) Convert an Exel to pdf : Conditional formats are not copied properly in the PDF
This is the sample code that i used to convert excel to pdf
Workbook workbook = new Workbook("C:\\Template1.xlsx");
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(SaveFormat.Pdf);
pdfSaveOptions.OnePagePerSheet = true;
workbook.Save("C:\\Template1toPDF.pdf");
I have attaced the Input Excel :Template1.xlsx & output PDF : Template1toPDF.pdf . .
These are the issues that we face as of now. Kindly help in solving the issues. .
Thanks & Regards,
Abdul R Sha
Hi,
Hi Amjad,
We have got the license for aspose.cells . Earlier we had some issues in gradient color rendering,Converting excel to pdf and the same has been logged as ticket ID No: CELLSNET-30449. Without fixing this issue we cannot move further in our project. This ticket is still in the unresolved status. Appreciate your help in this.
Regards,
Abdul R Sha.
Hi,
We have logged your comment/request. Hopefully it will be fixed soon. We will update you asap.
Hi Shakeel,
Still the issue’s that i mentioned were not Fixed.Its been so long that the issue is still in Unresolved status. We need the issue fixed asap so that it does not affect our project timelines. Appreciate your help in this regard.
Regards,
Abdul R Sha
Hi,
Will you please try the latest version:
Aspose.Cells for .NET (Latest Version)
and let me know your feedback.
Hi Shakeel,
Have used the latest version as shared by you. But still the issue is not solved. Its the same even after using the latest version. The issue is not solved.
Regards,
Abdul R Sha.
Hi,
Thanks for your feedback. I have increased the priority of this task. Hopefully it will be fixed soon.
Hi,
Hi ,
Hi,
Hi,