Comments (8)
Dear, @liufeijin
To build HelloQxlnt on Windows, you need to build two projects.
One is \Qxlnt\Qxlnt\Qxlnt.pro, the other is '\Qxlnt\HelloQXlnt\HelloQXlnt.pro'
1️⃣ First, Build Qxlnt(.dll & .lib) Using 'QT VS Tools'
- Choose menu 'Open Qt Project File (*.pro) ...'
- Select '\Qxlnt\Qxlnt\Qxlnt.pro' file
- Then, select menu 'Build' > 'Batch Build'
- Choose 'Select All' > 'Build'
- ❗️ If If the build fails, log information of failure is required.
2️⃣ Second, Build HelloXnlt Using 'QT VS Tools'. The build step is the same as above.
- ❗️ If If the build fails, log information of failure is required.
ℹ️ I built it in the following environment.
- Microsoft Windows 10 64bit
- Visual Studio 2017 64bit
- Qt 5.12.0 (VS2017/x64)
- Qt Visual Studio Tools 2.2.2
❕ If it does not build again, I need more accurate log information.
from qxlnt.
VS2017 Qtcreator4.8
The first step is ok get the lib.
The Second is fail.
main.obj👎 error: LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl xlnt::cell::value(int)" (_imp?value@cell@xlnt@@QEAAXH@Z),该符号在函数 main 中被引用
main.obj👎 error: LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl xlnt::cell::value(char const *)" (_imp?value@cell@xlnt@@QEAAXPEBD@Z),该符号在函数 main 中被引用
main.obj👎 error: LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl xlnt::workbook::save(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (_imp?save@workbook@xlnt@@QEBAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z),该符号在函数 main 中被引用
release\HelloQxlnt.exe👎 error: LNK1120: 11 个无法解析的外部命令
from qxlnt.
suggest you to make a clear and simple include struct , like my QXlsx as below, anybody only need include the QXlsx.pri in his pro file of project.
https://github.com/liufeijin/QXlsx/blob/master/21225.png
from qxlnt.
Hi, Thanks for reporting.
1️⃣ If you are using Visual C++, xlnt is compiled as a DLL.
The setting of Qxlnt reflects the DLL compilation.
So it need more complicated settings than QXlsx.
2️⃣ Use Visual Studio 2017 and Qt 5.9.1 or higher version. Qt 4 is not supported for C++14.
xlnt uses C ++ 14. To use C ++ 14, use Visual Studio 2017.
For more Qt and Visual Studio version information, please see the link.
- Qt 5.9.1 and later versions are pre-built for VS 2017 64 bits.
- Qt 5.12.0 (LTS) comes with precompiled binaries for VS 2017 32 and 64 bits.
I tested on Qt 5.11.1 and Qt 5.12.0
from qxlnt.
I used QT5.12.0 Visual studio 2017 build in qtcreator.
failed.
I think maybe the patch of QXInt problem
from qxlnt.
Hi, Thanks for reporting.
1️⃣ If you are using Visual C++, xlnt is compiled as a DLL.
The setting of Qxlnt reflects the DLL compilation.
So it need more complicated settings than QXlsx.2️⃣ Use Visual Studio 2017 and Qt 5.9.1 or higher version. Qt 4 is not supported for C++14.
xlnt uses C ++ 14. To use C ++ 14, use Visual Studio 2017.For more Qt and Visual Studio version information, please see the link.
- Qt 5.9.1 and later versions are pre-built for VS 2017 64 bits.
- Qt 5.12.0 (LTS) comes with precompiled binaries for VS 2017 32 and 64 bits.
I found where is the problem that build helloQXlnt need the Qxlnt.lib ( this lib is not the static lib )
So i rebuild QxLnt and got Qxlnt.dll and QxLnt.lib . copy to release folder and then ok
Generate a new excel file is ok,but don't know how to open a exit excel file modify and save.
QString filess="d:/1.xlsx";
wb.load(filess.toStdString());
xlnt::worksheet ws = wb.sheet_by_index(5); // wb.active_sheet();
ws.cell("A1").value(5);
ws.cell("B2").value("string data");
ws.cell("C3").formula("=RAND()");
ws.merge_cells("C3:C4");
ws.freeze_panes("B2");
wb.save("d:/1.xlsx"); // wb.save() can't use.
above code can't reach the target.
from qxlnt.
Congratulations on your success build.
Of course, _.lib is not a static lib. It is a lib for shared DLL.
To use xlnt, see xlnt document.
There are descriptions and examples.
from qxlnt.
Many thanks for your explain.
I checked the address , there are 3 simple . 1 generate a new excel file(i follow and ok)
1 is read a excel and qdebug out.
I rewrite the excel file generated by the simple code 1 , it is ok .
Can write , but has erroe also when i open the modified excel by office.
So i think i to be gave up QXlnt as it can't read the complex excel file.(error)
So only 1 way for us , it is QXlsx if you can repair the shared formula problem.
from qxlnt.
Related Issues (18)
- build error HOT 2
- Build error with Qt 5.15.2, macOS 11.4 HOT 1
- build error with Qt 6.1.2 Windows 10 HOT 5
- Read cell value have formula
- corrupted file when save using password
- cell is date type , but read out is wrong
- How to setup QxInt in visual studio? HOT 1
- Hi! HOT 1
- App crash when linked with both Qxlnt and QWebWidget HOT 2
- eruer
- print xlsx as a printer HOT 1
- Bug
- 라이브러리 설치가 제대로 되지 않는 거 같아서 질문 남깁니다
- Reading file issue HOT 3
- Can't read a file in Windows, Qt creator HOT 2
- How to setup QxInt ? HOT 1
- Can't read some cells of the file when using load() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qxlnt.