Setting Range.RowHeight has no effect

When I tried to set the row height by forming a range encompassing the row, it had no effect. Setting the ColumnWidth property through the range object worked fine.

// Works
excel.Worksheets[0].Cells.CreateRange(1,1,true).ColumnWidth=0.5;

// Doesn’t work
excel.Worksheets[0].Cells.CreateRange(1,1,false).RowHeight=0.5;

// Works
excel.Worksheets[0].Cells.SetRowHeight(0,3.75);


I’ll use the Cells.SetRowHeight method instead, as this works okay. Any thoughts on why Range.RowHeight has no effect?

Regards,

Josh

Dear Josh,

Please download fix 1.8.5 and have a try.

@Josh_Gallagher,
Aspose.Excel is discontinued now and is replaced with Aspose.Cells which contains all the latest features along with the support to the features provided by Aspose.Excel. Row height and column height can be set using this new product as follows:

string InputPath = dataDir + "Book1.xlsx";

// 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 3rd row of the worksheet
worksheet.AutoFitRow(1, 0, 5);

// Saving the modified Excel file
workbook.Save(dataDir  + "output.xlsx");

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

For more details on adjusting row height / column width and AutoFit rows and columns, follow the link below:
AutoFit Rows and Columns

The latest version of this product can be downloaded from the following link:
Aspose.Cells for .NET (Latest Version)

A running project with a bunch of examples can be downloaded here here.