本文介绍了Epplus defaultrowheight不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 除DefaultRowHeight外,以下所有行均可用于设置工作表的默认值。它没有看到做任何事情。我可以为各行设置行高,但默认情况下什么都不做。有什么想法吗? Dim wks 作为 ExcelWorksheet ... ... ... wks.Cells.Style.Font.Name = Calibri wks.Cells.Style.Font.Size = 10 wks.Cells.Style.Font.Color.SetColor(Color.Black) wks.Cells.Style.Horizo​​ntalAlignment = OfficeOpenXml.Style.ExcelHorizo​​ntalAlignment.Center wks.Cells .Style.VerticalAlignment = OfficeOpenXml.Style.ExcelVerticalAlignment.Center wks.Cells.Style.Numberformat.Format = @ wks.DefaultRowHeight = 15 我尝试过: 设置DefaultRowHeight。它不起作用。解决方案 谢谢理查德! All of the following lines work to set defaults for the sheet except for DefaultRowHeight. It doesn't see to do a thing. I can set the row height for individual rows just fine, but the default does nothing. Any ideas?Dim wks As ExcelWorksheet .........wks.Cells.Style.Font.Name = "Calibri"wks.Cells.Style.Font.Size = 10wks.Cells.Style.Font.Color.SetColor(Color.Black)wks.Cells.Style.HorizontalAlignment = OfficeOpenXml.Style.ExcelHorizontalAlignment.Centerwks.Cells.Style.VerticalAlignment = OfficeOpenXml.Style.ExcelVerticalAlignment.Centerwks.Cells.Style.Numberformat.Format = "@"wks.DefaultRowHeight = 15What I have tried:Setting DefaultRowHeight. It doesn't work. 解决方案 Thank you, Richard! 这篇关于Epplus defaultrowheight不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-16 09:05