Menu

Missing value in AddCell()

2019-02-07
2019-07-08
  • Norbert Wołowiec

    When call AddCell method with big number like 31594725 i have in xslsx i have in cell: 31594700

    Is that because in xml in package i have <c r="D7" s="6"><v>3.15947e+07</v></c>

    To solve this problem, just change this line:m_OStream << '<' << TagName << '>' << Value << "</" << TagName << '>'; to this one: m_OStream << '<' << TagName << '>' << std::fixed << Value << "</" << TagName << '>';

    Add info: https://en.cppreference.com/w/cpp/io/manip/fixed

     
  • Norbert Wołowiec

    It is possible that in other places this problem also occurs.

     
  • Norbert Wołowiec

    Better:

    std::setprecision(std::numeric_limits<_T>::digits10 + 1)
    
     
  • Alexandr Belyak

    Alexandr Belyak - 2019-02-12

    Hi,
    Sorry for the long answer, I am on a business trip now.
    And thanks for your help. Somewhat later, I will check everything well and report it additionally.

     
  • Alexandr Belyak

    Alexandr Belyak - 2019-03-13

    I apologize for my long silence, I still have a shortage of free time.
    I checked your solution, it works great. Thanks again for helping to develop the library!
    I will update the library a little later.

     
  • Norbert Wołowiec

    No problem.
    I'm glad that I can help.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.