Wrap Issue

I am experiencing issues with Wrap text.

Please see the attached samples.

The first 4 paragraphs contain the same text, but each in a different font.

The 2 files the exports are made from are identical apart from the size of the default font work the workbooks being different. The cells are set to wrap.


It seems the default font size greatly affects the wrapping calculations.

Should those calculations not be more relative to the font and size of the cell being wrapped?

Hi,

Please provide us your source xls/xlsx files and the sample code for replicating this problem. We will look into it and update you asap.

Please also try the latest version:
Aspose.Cells for .NET v7.0.1.1

Please find attached a sample application.

Check the output in the Images folder for 3 identical files (other than the default font)

that generate 3 different wrapping results.

Hi,


Thanks for the sample project.

I have tested using your sample project with your three Excel template files to convert them to image files and found the issue as you mentioned. I have logged a ticket for the issue with an id: CELLSNET-30729. We will look into your issue soon.

Thank you.

Hi,


After further investigation of your issue, we found your template file is set with Row.IsHeightMatched attribute, this property will allow Excel to automatically adjust row heights when opening the file into MS Excel. But if you do not use AutoFitRows feature, we cannot adjust the row heights accordingly for the images taken, we will use original row heights that are saved in Excel to render to Pdf/images. MS Excel will always show correctly because it will adjust widths of columns and heights of rows automatically.
For your case, you should always call auto-fit rows function(s) when you set something like Row.IsHeightMatched attribute.


Thank you.

In the application I experienced this issue with I already do autofitting.

And in the sample application I apply

Aspose.Cells.AutoFitterOptions autofit = new Aspose.Cells.AutoFitterOptions(); autofit.AutoFitMergedCells = true; autofit.IgnoreHidden = true; asposeWorksheet.AutoFitRows(autofit);


but still receive the same results.

Hi,


We will investigate your issue further and update you soon here.

Thank you.
Hi,

We think there is no issue. For your information, MS Excel will change text wrapping according to the default font set. You can check the print preview in Excel for each default font set.

Thank you.

Hi,


I’ve replicated it in Excel, and it is the same.

However, something that does not work, is “Justification”.

Justifying text in a wrapped cell causes breaks in words. Please see attached as an example of previewed image (The attachment may be in pdf, however it was printed to pdf for convenience purposes)

Kind regards,
Earl


Hi,

Please see the code below and the source and output files tested with:
Aspose.Cells for .NET v7.0.1.1

I don’t see any issue. Please provide us the source xls/xlsx file and the code example.

C#


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


Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(filePath);


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


Hi,


The source.xlsx.out text is not justified, it appears to be middle aligned.

Please see definition:
justified—text is aligned along the left margin, and letter- and word-spacing is adjusted so that the text falls flush with both the left, and right margin, also known as fully justified or full justification;

As per my output, the word-spacing is being adjusted, however incorrectly (letters of words going over to the next line etc etc). Please refer my output.

Wikipedia link for extended description of justified.
http://en.wikipedia.org/wiki/Justification_(typesetting)

The above gives an excellent example.

Thank you

Regarding above,


With latest Aspose.Cells (as posted today) Justification has worsened, please see attached output.

Left text display problems, as well as not right margin aligned.

Please note, cells are merged, and wrapped.


Hi,


To further assist, with source doc (Excel document.xlsx) and output (Output.pdf)

The output was in EMF, and printed to PDF for convenience purposes.

Hi,


I can notice the issue, we will look into it and get back to you soon.

Thank you.

Hi,

Please download: Aspose.Cells for .NET v7.0.1.4

You should call AutoFitRows firstly, for Excel will do autofit when row.IsHeightMatched is true.

We will not autofit until user calls it manually.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.