简体   繁体   中英

How do I make sure I get all the digits past the decimal out of Excel and into MySQL

I inherited a Java app that uses POI to read data from an Excel file into a MySQL DB. I'm noticing that cells that have numbers like 12.345678 are being read in as 12.3457 but I can't afford in this application to have the number rounded.

After some investigation it appears that my problem is not with POI. I saw that the value was read with POI correctly, placed into the insert statement correctly, but when executed, the DB did not contain the full precision.

I'm interested to hear the solution to your problem. I had a similar issue when working with GIS coordinates. My workaround was to stop working with Excel formatted files. I used CSV's where I could clearly tell all of the digits were present before sending to my database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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