We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Negative value Databar in conditional formatting

Hi

I am trying to convert my excel file with conditional formatting to PDF. Aspose Cell is not able to save conditonal negative values in PDF . All are showing as + values only. I am using your version 7.6.1 . as an example you just put 2 value in A1 and A2 . A1 = 20 ; A2= -25 then just do a conditional formatting as databar.

thanks

Pradeep

Hi Pradeep,

Thanks for your posting and using Aspose.Cells for .NET.

We were able to observe this issue. The negative value databars in conditional formatting are not rendered correctly. We have attached the source and output pdf file for a reference. We have logged this issue in our database. We will look into it and resolve this issue. 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-42158.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\test_data_bars.xlsx”;


Workbook workbook = new Workbook(filePath);

workbook.Save(filePath + “.out.pdf”, SaveFormat.Pdf);

Hi Shakeel,

Any update on the above case CELLSNET-42158.

thanks
Pradeep

Hi Pradeep,

Thanks for your posting and using Aspose.Cells.

We are afraid, your issue is not fixed yet. However, we have logged your comments in our database against this issue. Once, there is some fix or update for you, we will let you know asap.

Hi,

Thanks for using Aspose.Cells for .NET.

We have fixed this issue.

Please download and try this fix: Aspose.Cells for .NET v7.7.0.2 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-42158) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi,

I have another problem related to this. If all the values are negative or all the values are positive excel shows the correct result. But in PDF data bar start from either left or right edge of the cell, not from the center. You can reproduce this issue by creating an excel file with column with positive values and conditional formatting and convert this to Pdf .

thanks

Preetha

Hi Preetha,

Thanks for using Aspose.Cells.

We think, it is a correct behavior. We have tested this issue with the attached source xlsx file and converted it to pdf and it generated the correct databars. These databars are drawn from the left or right edges of the cells same as MS-Excel.

Please see the screenshot showing the comparison of positive and negative databars in MS-Excel and PDF for your reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\source.xlsx”;


Workbook workbook = new Workbook(filePath);

workbook.Save(filePath + “.out.pdf”, SaveFormat.Pdf);

Screenshot:

Thank you for the response. Please change Axis setting in excel to cell midpoint(conditional formatting settings). Then in excel data bars are drawn from mid point of cells,but in PDF databars are drawn from the left or right edges

thanks

Preetha

Hi Preetha,

Thanks for your feedback and using Aspose.Cells.

We were able to observe this issue. Databar conditional formatting with Axis settings to cell midpoint does not render correctly in the PDF. The data bars should be drawn from mid point but in PDF databars are drawn from left or right edges.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42448.

I have also attached the sample source xlsx file and output PDF for a reference.

C#


Workbook workbook = new Workbook(“source.xlsx”);

workbook.Save(“out.pdf”);

Hi,

Thanks for using Aspose.Cells.

We have fixed this issue.

Please download and try the latest fix: Aspose.Cells
for .NET v7.7.2.5
and let us know your feedback.

Thanks for the update and it is working fine with that problem. With this new dll(7.7.2.5) ,I have another problem. I have a template as in attachment ,formatted alternate rows with grey color. Insert a table and save into EXCEL and PDF, Excel output is fine , PDf showing different. It was working fine with version 7.7.0.2. Please see attachments. Below is the code I have used

Aspose.Cells.LoadOptions loadOptions = new Aspose.Cells.LoadOptions(LoadFormat.Xlsx);
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook("asposeTest1.xlsx", loadOptions);
Aspose.Cells.Worksheet ws = workbook.Worksheets[0];
int startCellRow = workbook.Worksheets.GetRangeByName("Start").FirstRow;
int startCellCol = workbook.Worksheets.GetRangeByName("Start").FirstColumn;
DataTable dt = new DataTable();
dt.Columns.Add();
dt.Columns.Add();

int total = 0;
DataRow dr1;
dr1 = dt.NewRow();
dr1[0] = "Item1";
dr1[1] = 3;
total = total + 3;
dt.Rows.Add(dr1);
dr1 = dt.NewRow();
dr1[0] = "Item2";
dr1[1] = 4;
total = total + 4;
dt.Rows.Add(dr1);
dr1 = dt.NewRow();
dr1[0] = "Item1";
dr1[1] = 5;
total = total + 5;
dt.Rows.Add(dr1);
int end = startCellRow + dt.Rows.Count;

DataTable dt_total = new DataTable();
dt_total.Columns.Add();
dt_total.Columns.Add();
DataRow dr2;
dr2 = dt_total.NewRow();
dr2[0] = "Total";
dr2[1] = total;
dt_total.Rows.Add(dr2);


ws.Cells.ImportDataTable(dt, false, startCellRow + 1, startCellCol, true, true);

ws.Cells.DeleteRow(startCellRow);
ws.Cells.DeleteRow(end);
ws.Cells.ImportDataTable(dt_total, false, end, startCellCol, false, true);


workbook.Save("ExcelReport_asop.xlsx", SaveFormat.Xlsx);

workbook.Save("Asposetest.pdf", SaveFormat.Pdf);

Hi,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue. The output pdf is different than output excel file. We have tested it with your given code using the latest version. I have attached both the output excel and pdf files for a reference.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42484.

Hi,

Thanks for using Aspose.Cells.

Please download and try the fix: Aspose.Cells
for .NET v7.7.2.6
and let us know your feedback.

Hi

Thanks for the fix. It is working fine

Preetha

Hi,


Thanks for your feedback.

Good to know that your issue is resolved by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-42448) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.