Click here to Skip to main content
15,850,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I cannot find a property in EPPlus that lets me center the content either vertically or horizontally on the page. I'm not talking about centering content in cells. I know how to do that.

Here's an image of the property in Excel

What I have tried:

Tried finding the setting. (ugh, sorry, but this section should be optional)
Updated 26-Jun-18 0:02am
avianrand 24-Jun-18 21:51pm    
Could y'all add a tag for EPPlus?
CHill60 25-Jun-18 7:57am    
Why would we add a tag for EPPlus when you should be going to the right place GitHub - JanKallman/EPPlus: Create advanced Excel spreadsheets using .NET[^]
avianrand 26-Jun-18 7:11am    
GitHub is not the right place. They don't take tech questions there. They want everyone to go to stackoverflow. I don't use stackoverflow. The people there are extremely uncool. I stopped using it a long time ago. The people here are (generally) nicer.
avianrand 26-Jun-18 7:13am    
Anyway, why does CodeProject have tags for tons of other things that can be handled elsewhere? I don't think I made an unreasonable request.
Maciej Los 26-Jun-18 4:57am    
You can do it yourself. Just use "Improve question" widget (right-bottom corner).

1 solution

Check this: EPPlus/ExcelPrinterSettings.cs at master · pruiz/EPPlus · GitHub[^]
See these properties: HorizontalCentered and VerticalCentered
Share this answer
avianrand 26-Jun-18 7:27am    
That was it. Thank you. I was looking for something more complicated for some reason.

ExcelWorksheet.PrinterSettings.HorizontalCentered = True
Maciej Los 26-Jun-18 7:30am    
You're very welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900