开发者

Extract data from excel file using C++ [closed]

开发者 https://www.devze.com 2023-04-11 08:20 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

Can anyone provide me a direct and easy way (ofcourse with codes and other necessar开发者_如何学JAVAy libraries to be included for right execution) to input data from excel file to C++? Actually, I need to input a huge amount of data to input from excel in C++ and finally when computed with C++, linking outputs with excel again. Can anyone help please?


As others have mentioned, using CSV files is the easiest route, as they can be imported/exported to and from Excel. This would likely be the most effective solution because it would require nothing more than the standard C++ libraries and would likely be much faster than using an Excel library. Once you have the CSV file, you can open it in Excel and convert it to a "real" Excel file if you wish.

If you are dealing with .xlsx files, you can take advantage of the fact that these files are simply zipped collections of XML files. More information can be found at this website. You would just have to find a zipping library and an XML library.

Otherwise, there are a few Excel libraries available, such as LibXL or xlsLib.

Finally, there are several posts on StackOverflow about this very topic. See the following:

C++ library to load Excel (.xls) files

Excel files and C++

What is a simple and reliable C library for working with Excel files?


The easiest way is to export data from Excel as CSV and write back to CSV.


Check out these pages on Office Automation.


For native .xls file OLE XLS from SM Software does a decent job... nothing for free though!

0

精彩评论

暂无评论...
验证码 换一张
取 消