
以下是执行分页逻辑的一段代码(CreateTextCell是一个创建文本单元格并返回的方法):
var tbl = current.SlIDe.Descendants<A.table>().First(); var tr = new A.tableRow(); tr.Height = 200000; tr.Append(CreateTextCell(product.name)); tr.Append(CreateTextCell(product.ProductNumber)); tr.Append(CreateTextCell(product.Size)); tr.Append(CreateTextCell(String.Format("{0:00}",product.ListPrice))); tr.Append(CreateTextCell(product.SellStartDate.ToShortDateString())); tbl.Append(tr); totalHeight += tr.Height; if (totalHeight > pageborder) overflow = true;解决方法 我有一个非常相似的 question,并发现通过Open XML SDK填充表时,表的高度不会更新.只有在Power Point中实际打开演示文稿时才会更新它.这显然无法帮助您在代码中弄清楚何时将表拆分为新幻灯片,但如果您尝试使用此 answer,则可能有所帮助. 总结 以上是内存溢出为你收集整理的c# – 自动换行的OpenXML,PresentationML表高度和行高全部内容,希望文章能够帮你解决c# – 自动换行的OpenXML,PresentationML表高度和行高所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)