GithubHelp home page GithubHelp logo

Comments (5)

Malvineous avatar Malvineous commented on May 22, 2024

Sorry found a couple more in the new files:

../include/xlnt/reader/workbook_reader.hpp:32:48: error: ‘uint8_t’ is not a member of ‘std’
 xlnt::workbook load_workbook(const std::vector<std::uint8_t> &bytes);
                                                ^
../include/xlnt/reader/workbook_reader.hpp:32:48: error: ‘uint8_t’ is not a member of ‘std’
../include/xlnt/reader/workbook_reader.hpp:32:60: error: template argument 1 is invalid
 xlnt::workbook load_workbook(const std::vector<std::uint8_t> &bytes);

Fixed by:

--- a/include/xlnt/reader/workbook_reader.hpp
+++ b/include/xlnt/reader/workbook_reader.hpp
@@ -23,6 +23,7 @@
 // @author: see AUTHORS file
 #pragma once

+#include <cstdint>
 #include <vector>

 namespace xlnt {

And:

worksheet_writer.cpp: In function ‘std::string xlnt::write_worksheet(xlnt::worksheet, const std::vector<std::basic_string<char> >&, const std::unordered_map<long unsigned int, std::basic_string<char> >&)’
worksheet_writer.cpp:119:9: error: ‘sort’ is not a member of ‘std’
         std::sort(styled_columns.begin(), styled_columns.end());
         ^                                 
worksheet_writer.cpp:163:26: error: ‘floor’ is not a member of ‘std’
             if(height == std::floor(height))

Fixed by:

--- a/source/worksheet_writer.cpp
+++ b/source/worksheet_writer.cpp
@@ -1,3 +1,4 @@
+#include <algorithm>
 #include <sstream>

 #include <xlnt/cell/cell.hpp>

from xlnt.

Malvineous avatar Malvineous commented on May 22, 2024

Also got some linker errors compiling the samples:

libxlnt.so: undefined reference to `long long xlnt::cell::get_value<long long>() const'

Which looks like a similar fix to the set_value() solution:

--- a/source/cell.cpp
+++ b/source/cell.cpp
@@ -614,6 +616,18 @@ std::uint64_t cell::get_value() const
 {
     return static_cast<std::uint64_t>(d_->value_numeric_);
 }
+
+template<>
+long long cell::get_value() const
+{
+    return static_cast<long long>(d_->value_numeric_);
+}
+
+template<>
+unsigned long long cell::get_value() const
+{
+    return static_cast<unsigned long long>(d_->value_numeric_);
+}

 template<>
 float cell::get_value() const

from xlnt.

tfussell avatar tfussell commented on May 22, 2024

I made some pretty major changes so I had a feeling some problems might show up. I'll get to work on these and the previous issues.

from xlnt.

Malvineous avatar Malvineous commented on May 22, 2024

No worries, many thanks for taking the time to work on this!

from xlnt.

Malvineous avatar Malvineous commented on May 22, 2024

This is all fixed now too with the latest git version - thanks again!

from xlnt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.