Hi,
executing this simple code…
var wb = new Workbook();
var ws = wb.Worksheets[0];
var s = new Style();
var f = new StyleFlag();
s.Font.Name = “Tahoma”;
s.Font.Size = 7;
f.All = true;
ws.Cells.ApplyStyle(s, f);
ws.Cells[0, 0].PutValue(“Value1”);
ws.Cells[1, 0].PutValue(“Value2”);
ws.Cells[2, 0].PutValue(“Value3”);
ws.AutoFitColumns();
wb.Save(@“C:\File.xls”);
… RowHeight is not the default value of 12.75 but is fit to new font size.
This is an issue?
ty
palegra
Hi,
Please add a line to your code, it works fine.
Sample code:
var wb = new Workbook();
var ws = wb.Worksheets[0];
var s = new Style();
var f = new StyleFlag();
s.Font.Name = “Tahoma”;
s.Font.Size = 7;
f.All = true;
ws.Cells.ApplyStyle(s, f);
var ws = wb.Worksheets[0];
var s = new Style();
var f = new StyleFlag();
s.Font.Name = “Tahoma”;
s.Font.Size = 7;
f.All = true;
ws.Cells.ApplyStyle(s, f);
ws.Cells.StandardHeight = 12.75;
ws.Cells[0, 0].PutValue(“Value1”);
ws.Cells[1, 0].PutValue(“Value2”);
ws.Cells[2, 0].PutValue(“Value3”);
ws.AutoFitColumns();
wb.Save(@“C:\File.xls”);
ws.Cells[0, 0].PutValue(“Value1”);
ws.Cells[1, 0].PutValue(“Value2”);
ws.Cells[2, 0].PutValue(“Value3”);
ws.AutoFitColumns();
wb.Save(@“C:\File.xls”);
STILL WRONG…
RowHeigth became 9 on first three rows.
Other suggestions?
I can see the issue but for the first row only whose height is 9.00 while all other rows (including 2 and 3) are 12.75 which is fine. I am using v7.0.4.8.
Sample code:
var wb = new Workbook();
var ws = wb.Worksheets[0];
var s = new Style();
var f = new StyleFlag();
s.Font.Name = “Tahoma”;
s.Font.Size = 7;
f.All = true;
ws.Cells.ApplyStyle(s, f);
ws.Cells.StandardHeight = 12.75;
ws.Cells[0, 0].PutValue(“Value1”);
ws.Cells[1, 0].PutValue(“Value2”);
ws.Cells[2, 0].PutValue(“Value3”);
ws.AutoFitColumns();
wb.Save(@“C:\File.xls”);
I have logged a ticket for this with an id: CELLSNET-40286. We will look into it and get back to you soon.
Thank you.