Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:55:31+00:00 2026-06-18T02:55:31+00:00

I am using EPPLus to create and format an excel sheet from my data

  • 0

I am using EPPLus to create and format an excel sheet from my data set. I want to set headers on the excel sheet using EPPlus. I could not find a way to do it. I want to set the left header, right header and center header.
I have done this using VBA code, but I wan to move away from that.
In VBA I would just do

With ActiveSheet.PageSetup
.LeftHeader = ""
.RightHeader =""
.CenterHeader= ""
End With

Help!!
Thanks

PS: I am creating a winforms application. I was not sure if that would change anything but just wanted to mention it here. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:55:33+00:00Added an answer on June 18, 2026 at 2:55 am

    I finally figured it out.

    It can be done using 
    workSheet.HeaderFooter.FirstHeader.LeftAlignedText = ""
    workSheet.HeaderFooter.FirstHeader.RightAlignedText = ""
    workSheet.HeaderFooter.FirstHeader.CenterAlignedText = ""
    

    This sets for the First page.
    Changing the FirstHeader Property to EvenHeader and OddHeader sets if for the following pages.

    There are a couple of properties differentFirst and differentOddEven which set if the pages have different headers. But I was not able to get it to work By setting them to false and just setting one of the headers.
    Had to set all three separately.

    Hope it is useful
    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the EPPLUS library to read data from Excel to create another file.
I am using EPPlus to create excel files and provide them with data. And
Is it possible to get a cell value from excel sheet using EPPlus and
I'm using the EPPlus .NET library in order to export data from SQL Server
I am using EPPLUS to retrieve string values from Excel. The strings take the
I'm building a console app that moves data into an excel file (using EPPlus
I've tried searching but I cannot seem to find a way to set a
I have created an excel file using EPPlus and everything is OK until I
When I try to generate an Excel file using EPPlus, Excel give me the
I'm looking for an Excel library which reads/writes .xls (not .xlsx) files. I'm using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.