I want to read a data from excel file and store into variable i also want to read index of excel file.I don't no how to do this.so please show the your example in c++ code.
Asked
Active
Viewed 368 times
-3
-
See this open project with example implementation - https://github.com/tfussell/xlnt – seccpur Nov 24 '19 at 08:31
-
please show what you have tried ! – αԋɱҽԃ αмєяιcαη Nov 24 '19 at 10:07
1 Answers
2
Excel files are quite hard to read with C++. They are stored as a binary file and need to be properly read and interpreted by your code.
There are libraries out there to do this. Maybe check this post out

Danish
- 407
- 3
- 10
-
It's not clear, if OP really means xls/xlsx files. cvs is supported by excel too amongst many other formats – nada Nov 24 '19 at 10:28
-
I visit this post and use this #include"libxl.h" but my excel file unable to open. code //if (book->load(L"example.xls")){....} and my excel file name is example.xls why it is opening? can you help me? – Syed Ali Shahzil Nov 24 '19 at 10:47
-
You should update the question with what you have tried so far and show where you're stuck. Please show your code and how you compile it. – Danish Nov 24 '19 at 12:26