Re: Placing Image to cell- but it's scaled on height based on the rows auto height

Hi,

Thanks for your posting and using Aspose.Cells.

We have tested your issue with the latest version: Aspose.Cells
for .NET v7.6.1.3
and it works fine. Please see the output xlsx file attached with this post. All the images are placed with same height independent of the row’s height.

If your issue still occurs, then please provide us your template file, sample project replicating this issue and expected output file. We will look into it and help you asap.

Hi,

Thanks for your posting and using Aspose.Cells.

We have tested your issue with the latest version: Aspose.Cells
for .NET v7.6.1.3
and it works fine. Please see the output xlsx file attached with this post. All the images are placed with same height independent of the row’s height.

If your issue still occurs, then please provide us your template file, sample project replicating this issue and expected output file. We will look into it and help you asap.

I used your latest library and it didn't solved the issue. Please see attached excel and template.

Can you give me example of what which property I need to set on the image/sheet to make pictures has fixed height not scaled withing the cell?

Cheers, VM

Hi,

Thanks for your template file and using Aspose.Cells.

It might be a bug of Aspose.Cells that could be replicable with your smart marker tags. We need to test it.

We would need your sample code/project replicating this issue with the latest version. You can provide a data set used in your smart marker files with some dummy data and post your project.

We will look into it and if it is a bug, we will log it in our database for a fix.

Hello, please check out project I attached.


Basically what I to achieve is to have graph image to not be scaled based on width of the row. Which is currently happening.

Hi VM,

Thanks for your sample project and using Aspose.Cells.

We were able to observe this issue. The height of the images change even though it is fixed in Smart Marker tag. We have tested it with the latest version and issue persists in it. 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-42236.

Hi,

Thanks for using Aspose.Cells

In xls file, the height of picture is stored as scale on height based on
the rows.

We do not auto fit row height when processing smart markers. MS
Excel will auto fit row height if the rows’ height is auto, so the height will
be changed if the rows height is not same as stored.

It seems you have to auto
fit row height by yourself with modified AdjustIimages method:

C#


private void AdjustIimages(WorkbookDesigner wd)

{

var worksheet = wd.Workbook.Worksheets[0];


for (int i = 0; i < worksheet.Pictures.Count; i++)

{

var pict = worksheet.Pictures[i];

pict.Placement = PlacementType.FreeFloating;

}

AutoFitterOptions options = new AutoFitterOptions();

options.OnlyAuto = true;

worksheet.AutoFitRows(options);


}

Please see project attached, I updated my test project and I cant say it helped. What I did I set fixed row height on template row, that will make picture to render in right dimensions, however switching row to dynamic height doesn't seems to work. Please see project attached.

Cheers, VM

Hi,

Thanks for using Aspose.Cells.

Now, you will have to increase the height of your smart marker row so that all the data could fit inside it fully. Please see the template file with the adjusted row and the output file generated by your code for your reference.

Well, that’s not helping…


however, how can I be notified, when there will be update based on CELLSNET-42236. ticket?

Thanks. VM


Hi,

Thanks for using Aspose.Cells.

Whenever there is some update for this issue, we post on this thread. Your issue is closed with the status won’t fix. We have already provided you the reason why this issue cannot be fixed. Please check the above post for your reference.

Could you please provide us your desired output xlsx file which you can create manually in MS-Excel? We will look into it if it could be achieved or not and update you asap.

Please see excel attached.


Key Features of this excel are - dynamic height of the rows, 100% scale height on the pictures, fixed height of the pictures. Pictures are positioned in right cells based on the marker in template.

Do you see what is wrong with the original aspose output?

Hi VM,

Thanks for your expected output and using Aspose.Cells.

At present, it is only achievable by fixing the row’s height as shown in the above post. For dynamic heights, we will investigate how could we achieve your desired output. We have logged your comment and files in our database and reopened this issue. We will look into it and propose you a solution if possible. Once, there is some update for you, we will let you know by posting in this thread.

Hi,

Thanks for using Aspose.Cells for .NET.

Please download and try this fix: Aspose.Cells for .NET v7.7.0.2.

Please use the following code.

C#


private void AdjustIimages(WorkbookDesigner wd)

{

var worksheet = wd.Workbook.Worksheets[0];


for (int i = 0; i < worksheet.Pictures.Count; i++)

{

var pict = worksheet.Pictures[i];

pict.Placement = PlacementType.Move;

}


AutoFitterOptions options = new AutoFitterOptions();

// options.OnlyAuto = true;

worksheet.AutoFitRows(options);

}


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


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