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

  • SEARCH
  • Home
  • 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 9128567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:32:43+00:00 2026-06-17T07:32:43+00:00

I want to set date in date format in an Excel file with Apache

  • 0

I want to set date in date format in an Excel file with Apache POI. The value will set in such a manner so that in Address Bar it will show as mm/dd/YYYY and in cell it will show as dd-mmm (numeric day and month abbreviation: 01-Jan).

  • 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-17T07:32:45+00:00Added an answer on June 17, 2026 at 7:32 am

    You can apply a CellStyle to the cell you need to fill. Here some code snippets from my past work, it’s not intact but shows the basic idea:

    Row row = sheet.createRow(0);
    Cell cell = row.createCell((short) 0);
    cell.setCellType(Cell.CELL_TYPE_NUMERIC);
    
    SimpleDateFormat datetemp = new SimpleDateFormat("yyyy-MM-dd");
    Date cellValue = datetemp.parse("1994-01-01 12:00");
    cell.setCellValue(cellValue);
    
    //binds the style you need to the cell.
    CellStyle dateCellStyle = wb.createCellStyle();
    short df = wb.createDataFormat().getFormat("dd-mmm");
    dateCellStyle.setDataFormat(df);
    cell.setCellStyle(dateCellStyle);
        
    

    More information about date format in JDK, you should read this: http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html

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

Sidebar

Related Questions

I want to set date in this format MMM dd, yyyy HH:mm, I hede
Given a certain date, I want to set the value of a cell with
I've added a formats.py file to my django project to set the date format
I want to set date in format like this, Friday, March 4, 2012 3:15
I want to set user date format yyyyMMdd using culture name. Which culture name
Hello Everybody I want set date in to datepicker from string like above format
I want to set format of date to dd-mm-yyyy for control date time picker,i
I have a DATE datatype mysql column in a table. I want to set
I want to display result set of Years between From date - To date
I am looking for a way to set date format in either mm/dd/yyyy or

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.