AutoFitColumn not wokring

Hi,
My Aspose version is 17.6.0.0, The attachment is the test excel, When I am trying to do autofitcolumn for the first three columns of the test excel, it seems not working. Below is my code.

public void TestAutoFitColumn(string InputPath, string OutputPath)
{
// Creating a file stream containing the Excel file to be opened
FileStream fstream = new FileStream(InputPath, FileMode.Open);

        // Opening the Excel file through the file stream
        Workbook workbook = new Workbook(fstream);

        // Accessing the first worksheet in the Excel file
        Worksheet worksheet = workbook.Worksheets[0];

        // Auto-fitting the Column of the worksheet
        worksheet.AutoFitColumn(0);
        worksheet.AutoFitColumn(1);
        worksheet.AutoFitColumn(2);

        // Saving the modified Excel file
        workbook.Save(OutputPath);

        // Closing the file stream to free all resources
        fstream.Close();
    }

test.zip (98.5 KB)

@985664960,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-48353 - AutoFitColumn is not wokring

@985664960,
AutoFitColumn can not work fine if Worksheet.Zoom is not 100.We are working on this issue for a long time. But there is no obvious progress.

OK, thanks for you reply

@985664960,
You are welcome.

Hi @ahsaniqbalsidiqui,

I am also facing the same issue, even after I added below

worksheet.Zoom = 100;

Kindly advice.

Thanks.

Pls note: Cell lock has been applied on all columns and this seems working in local system, but when deployed to app service in azure, it doesn’t work.

Aspose.Cells version : 21.9.0

@kpm563m

Please try our latest version/fix: Aspose.Cells v21.12.x. If you still find the issue, kindly do share your sample code (runnable) and sample files(if any) to reproduce the issue on our end. We will check it soon.

PS. please zip the file prior attaching here.