[英]Force Landscape ExcelPackage c#
I wanted to generate Excel sheets from C#, so I used the ExcelPackage libraries to do so. 我想从C#生成Excel工作表,因此我使用了ExcelPackage库。 Everything works fine and I am able to generate and download the sheet. 一切正常,我能够生成和下载工作表。
The last thing I want to achieve is setting the sheet from Portrait to Landscape mode. 我要实现的最后一件事是将工作表从“ 纵向”设置为“ 横向”模式。 Is there a way to do this, using ExcelPackage? 有没有办法使用ExcelPackage做到这一点? I tried searching the documentation, but didn't find anything. 我尝试搜索文档,但未找到任何内容。
Thanks 谢谢
ExcelPackage无法使用c#在纵向模式下设置Excel工作表。
It is possible! 有可能的! And this is how is have to be made: 这是必须要做的:
workSheetByRight.PrinterSettings.Orientation = eOrientation.Landscape;
Where workSheetByRight is of type - ExcelWorksheet 其中workSheetByRight是类型-ExcelWorksheet
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.