This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20933|Reply: 1

[Source] Nopi reads the time format in Excel

[Copy link]
Posted on 1/21/2019 11:06:05 AM | | |
Question: When reading Excel with Npoi, I used it directly at firstDateCellValue, but the debug finds that the time format is converted to a number, which throws an exception.Solution: First, determine whether the cell type is NUMERIC, and then use the DateUtil.IsCellDateFormatted method to determine whether the cell is in date format, and finally passDateTime.FromOADate method converts numbers into corresponding times







Previous:< Thunder > 5.87 Green Unlimited Speed Collector's Edition supports WIN10
Next:The time range matches the year and month
Posted on 1/21/2019 11:43:04 AM |
Thanks for sharing
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com