我怎样才能改变EXCEL表格中所有非空行的行高呢?先谢谢你。
ufj5ltwl1#
...EntireRow.RowHeight = value;
jecbmhm32#
似乎是“Range.RowHeight”来修改范围的行高。http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.namedrange.rowheight%28v=vs.80%29.aspx
fnatzsnv3#
我使用以下代码:
xlWorkSheet.Rows.RowHeight = height; xlWorkSheet.StandardWidth = width;
jfewjypa4#
MySheet.UsedRange.EntireRow.Height = value;
tsm1rwdh5#
MySheet.UsedRange.EntireRow.Height
只准备好了。可惜没用。试试这个:
NamedRange.RowHeight = X;
请查看MSDN以获取更多信息:http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.namedrange.rowheight%28v=vs.80%29.aspx
nfzehxib6#
这对我很有效:
var SomeCell = (Excel.Range)_xlSheet.Cells[1, 1]; SomeCell.Value2 = "What was D.D. Eisenhower's Gettysburg Address?"; SomeCell.RowHeight = 32;
41zrol4v7#
试试这个sampleRange.Resize.RowHeight=x; //x's type must int
sampleRange.Resize.RowHeight=x; //x's type must int
dwbf0jvd8#
试试这个,你可以用一个for循环来循环true所有的行
int i = 0; for (var i = 0; i < column.Count(); i++) { worksheet.Row(i).Height = 100; }
nfg76nw09#
using (XLWorkbook xLWorkbook = new XLWorkbook()) { var wordsheet = xLWorkbook.Worksheets.Add(dtEmpDetail, status); wordsheet.Row(2).Height = 50; wordsheet.Range("A1:d2").Merge(); }
9条答案
按热度按时间ufj5ltwl1#
jecbmhm32#
似乎是“Range.RowHeight”来修改范围的行高。http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.namedrange.rowheight%28v=vs.80%29.aspx
fnatzsnv3#
我使用以下代码:
jfewjypa4#
tsm1rwdh5#
只准备好了。可惜没用。
试试这个:
请查看MSDN以获取更多信息:http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.namedrange.rowheight%28v=vs.80%29.aspx
nfzehxib6#
这对我很有效:
41zrol4v7#
试试这个
sampleRange.Resize.RowHeight=x; //x's type must int
dwbf0jvd8#
试试这个,你可以用一个for循环来循环true所有的行
nfg76nw09#