How to get input (.xlsx) from C++ to an Excel file?

Asked 1 weeks ago, Updated 1 weeks ago, 1 views

VSCode is using g++ to solve the algorithm problem.

freopen("input.txt", "r", stdin);

If you use freopen like above, you could easily input the txt file no matter how long the input value was.

I need to input the .xlsx excel file this time.

I googled and found mfc and other libraries

I don't have to deal with Excel completely like making sheets or putting cells together

It is enough to read like a free-open and then select only the values you want and save them as an Excel file

It was hard to find the way I wanted it.

If you know how to fit my purpose, please answer me!

c++

2022-09-20 10:24

1 Answers

Excel-related Microsoft Office program formats store files using technologies such as OLE.

It is best to extract the contents of the file using a library because it is impossible unless you are familiar with the format.

Or, if your data consists of plaintext, such as a csv file, you can read and write file data without using the library.


2022-09-20 10:24

If you have any answers or tips


© 2022 pinfo. All rights reserved.