U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » UppHub » Added Xlnt .xlsx library
Added Xlnt .xlsx library [message #60446] Fri, 02 February 2024 10:22 Go to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hi everyone

Xlnt library has been added to UppHub. Xlnt is a library for manipulating spreadsheets in memory and reading/writing them from/to XLSX files, in Windows and Linux.
This library does not require MS Office or Open Office to be installed.

Xlnt U++ in UppHub includes some helper functions for Xlnt, and a simple sample included in examples/Xlint_demo_cl package.

As it is a C++ library, simple to use, no wrapper has been created.

Being on UppHub, any U++ user can use it very easily.


Best regards
Iñaki
Re: Added Xlnt .xlsx library [message #61752 is a reply to message #60446] Sun, 27 July 2025 13:08 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Xlnt is updated to latest commit 326bcc5 (22/07/2025)
Now it uses Xlnt-Community thanks to Forlano advice.

Please rebuild all after updating.


Best regards
Iñaki
Re: Added Xlnt .xlsx library [message #61978 is a reply to message #61752] Wed, 22 April 2026 20:03 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1221
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I have problem to reinstall <plugin/Xlnt> from UppHUb. Is there any problem?

Thanks,
Luigi

Re: Added Xlnt .xlsx library [message #61979 is a reply to message #61978] Thu, 23 April 2026 07:57 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Luigi

The first possible reason is that it would be necessary to update UppHub, as some libraries used by Xlnt have changed.
If this is not the case please give me more details.


Best regards
Iñaki
Re: Added Xlnt .xlsx library [message #61980 is a reply to message #61979] Thu, 23 April 2026 13:07 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1221
Registered: March 2006
Location: Italy
Senior Contributor
Hi Iñaki,

thanks for reply.
I had to do a fresh install of U++ and now it works. I do not know why it stopped to work.
While compiling my app I just noticed a compiler complain in package function4U (Clang under Windows)

C:\upp\UppHub\Functions4U/Functions4U/Defs.h (7): error: no matching function for call to 'isnan'

ChatGPT examined the code and said std::isnan<double>(n) does not require <double>.
I do not know if it is true (sometimes it invents things). Anyway it gives me the following version

#ifndef _Functions4U_Defs_h_
#define _Functions4U_Defs_h_

#include <cmath>
#include <complex>
#include <limits>

namespace Upp {

#ifdef PLATFORM_WIN32
inline bool IsNum(const double &n) { return !std::isnan(n) && !std::isinf(n) && !IsNull(n); }
inline bool IsNum(const float  &n) { return !std::isnan(n) && !std::isinf(n); }
#else
inline bool IsNum(const double &n) { return !__builtin_isnan(n) && !__builtin_isinf(n) && !IsNull(n); }
inline bool IsNum(const float  &n) { return !__builtin_isnan(n) && !__builtin_isinf(n); }
#endif

inline bool IsNum(const int &n) { return !IsNull(n); }

template <typename T>
inline bool IsNum(const std::complex<T> &n) {
    return !(!IsNum(n.real()) || !IsNum(n.imag()));
}

template <typename T>
bool IsNull(const std::complex<T> &d) { return !IsNum(d); };

#define NaNComplex std::complex<double>(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN())
#define NaNDouble  std::numeric_limits<double>::quiet_NaN()

template <typename T>
inline std::complex<T> i() { return std::complex<T>(0, 1); };

template <typename T>
inline bool IsNum(const Point_<T> &n) { return IsNum(n.x) && IsNum(n.y); }

}
#endif
and I was able to compile. I hope it will not backfire. Please have a look at it.

Thanks and best regards,
Luigi

[Updated on: Thu, 23 April 2026 13:07]

Report message to a moderator

Re: Added Xlnt .xlsx library [message #61981 is a reply to message #61980] Thu, 23 April 2026 15:39 Go to previous message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hi Luigi

Thank you for your concern and your help.

In my case I have CLANG18 in Windows and Linux, and they do not complain.
In any case I have removed the <double> and <float>, so I hope that your compiler will nor complain now.

Thank you again.


Best regards
Iñaki
Previous Topic: Added NetCDF library
Goto Forum:
  


Current Time: Fri May 01 00:20:20 GMT+2 2026

Total time taken to generate the page: 0.00544 seconds