简体   繁体   English

如何使用Apache POI从具有公式字段的Excel单元格中读取确切的日期格式?

[英]How to read the exact date format from Excel cell having formula field with Apache POI?

I have Excel date format of the cell as: 我的单元格的Excel日期格式为:
MM-DD-YYYY HH:MM MM-DD-YYYY HH:MM

I need to fetch the same format irrespective of any format given in excel using apache poi 我需要使用apache poi提取相同格式,而不管excel中给出的任何格式

Can someone help ? 有人可以帮忙吗?

What have you tried? 你尝试了什么? Please try using DataFormatter as shown in first part of Getting the cell contents. 请尝试使用“获取单元格内容”第一部分中所示的DataFormatter。 If that not fulfills your needs then please show used code in your question together with what the code produces and what you wants to get. 如果那不能满足您的需求,请在问题中显示使用过的代码以及代码产生的内容和您想要获得的内容。 @axel ritcher @axel ritcher

This worked 这工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM