Importing and Exporting from Excel in C++

I'm writing a program to sort a Binary Design Structure Matrix. Ideally, I'd like to use Excel as a user interface for both the input of the data and the output of the sorted matrix.

From the research I've done the easiest way to do this is to make a macro in excel that runs a C++ file. That program would export the excel data to a .csv file, read it, sort it, then export it as a .csv file before its read in excel.
I'd prefer it if the output were a new excel spreadsheet.

Is this plausible? It seems to be the simplest way of doing this, but I'm not totally sure on how to set up the code in either program. I was unsure whether to put this in windows programming or not, but hope this is ok.

Thanks a lot
Topic archived. No new replies allowed.