+ Reply to Thread
Results 1 to 9 of 9

Cell value got changed/precise after saving excel sheet without any change

  1. #1
    Registered User
    Join Date
    12-09-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Question Cell value got changed/precise after saving excel sheet without any change

    I have observed that values in cell got precised when we open excel/csv and save without changing any value.

    if original value while opening excel is
    123.45678989
    change to
    123.4567899 (after 10 digit it gets roundoff not considering decimal)

    0.0000000089
    change to
    0.000000009 (after 10 digit it gets roundoff not considering decimal)

    1.0000000089E-12
    change to
    1.000000009E-12

    As i didinot change any value in excel but it automatically changed the value while saving i face issue in my code.

    In code i need original value as well as changed value , if there is changed value , we need to create a delta. But here i didnot change any value but excel automatically change the value so in code i get original as well as changed value and it by default create delta which i dont want.

    How to fix this issue /handle in java code , while saving excel without any change the original value or changed value remain same.

    Please give your inputs.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Cell value got changed/precise after saving excel sheet without any change

    Is this only happening when saving to CSV?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-09-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Re: Cell value got changed/precise after saving excel sheet without any change

    This is happening only for Csv

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,412

    Re: Cell value got changed/precise after saving excel sheet without any change

    I saved an Excel file as CSV, closed it, re-opened it and the value was the same.

    NOTE: when CSV file is open it DISPLAYS as 123.4567899 but changing the number format to 8 decimal places will show the original value.

  5. #5
    Registered User
    Join Date
    12-09-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Re: Cell value got changed/precise after saving excel sheet without any change

    Just write 123.45678989 value in csv , save the file and again open it , value change to 123.4567899

    In my Java code i need to do some execution only when i changed the value manually

    if(originalValue !== changedValue)
    {
    ....
    }

    original value is 123.45678989
    as while saving csv automatically change the value to 123.4567899

    As i didnot change it manually still (originalValue!==changedValue) true it will run if loop code which i dont want as i didnot changed the value its csv itself changed it.

    How to handle this.?

  6. #6
    Registered User
    Join Date
    12-09-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Re: Cell value got changed/precise after saving excel sheet without any change

    Just write 123.45678989 value in csv , save the file and again open it , value change to 123.4567899

    In my Java code i need to do some execution only when i changed the value manually

    if(originalValue !== changedValue)
    {
    ....
    }

    original value is 123.45678989
    as while saving csv automatically change the value to 123.4567899

    As i didnot change it manually still (originalValue!==changedValue) true it will run if loop code which i dont want as i didnot changed the value its csv itself changed it.

    How to handle this.?

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,412

    Re: Cell value got changed/precise after saving excel sheet without any change

    I did exactly that: I opened Excel, put in value, saved file as CSV, closed file, re-opened CSV file and value was the same.

    NOTE: when CSV file is open it DISPLAYS as 123.4567899 but changing the number format to 8 decimal places will show the original value.

    Did you try the above?

  8. #8
    Registered User
    Join Date
    12-09-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    5

    Re: Cell value got changed/precise after saving excel sheet without any change

    do you want to say to change number format to 8 decimal in excel format cell option?

    If i do this also it will change to 123.45678990 not original value this 123.45678989 .

    Is there any way that while saving it will not change the value?

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,412

    Re: Cell value got changed/precise after saving excel sheet without any change

    No it will not change the value: it will simply show the correct digits: PLEASE try it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. When changed zoom in one sheet, change it also in another one
    By drrazor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2014, 04:59 AM
  2. [SOLVED] I Want the Timestamp Value Not to Change if the Name Cell Changed
    By bssol in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-07-2013, 04:48 AM
  3. Change Active sheet color when data is changed
    By usafmeinweg in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-09-2011, 03:36 PM
  4. Change cell value when sheet name changed
    By hesham63 in forum Excel General
    Replies: 3
    Last Post: 06-23-2010, 09:27 PM
  5. [SOLVED] change date only if cell is changed
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2010, 09:16 AM
  6. Precise positioning of a graphic in Excel
    By fishbin in forum Excel General
    Replies: 4
    Last Post: 12-22-2005, 12:20 AM
  7. Saving excel data that is changed weekly
    By Kaye in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-07-2005, 12:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1