It is very easy to change the orientation of the Excel sheet while using EPPlus library. This is often necessary when one needs to check the print preview of the generated excel file.
Suppose, your worksheet variable name is ws then,
ws.PrinterSettings.Orientation = eOrientation.Landscape.
Thats it. It is a simple one-liner.
Suppose, your worksheet variable name is ws then,
ws.PrinterSettings.Orientation = eOrientation.Landscape.
Thats it. It is a simple one-liner.
Thanks man
ReplyDeleteThank you!
ReplyDeleteMany thanks!
ReplyDelete