Hello I want to write a program in c++ to convert certain rows which i can choose from a table in excel to .csv. Anyone done anything similar? I am not sure how to do this, still thinking, any suggestions.

Recommended Answers

All 5 Replies

Member Avatar for iamthwee

Assuming there is a reason you don't just want to open the excel and choose to save it as a .csv, you can do this through a program, although it isn't easy.

I saw some code written in native c++ once, (free) but couldn't get it to work. There are some good modules in python/ and apache have some good stuff too.

If you want .net has great functionality with excel.

Thanks for your reply. The reason im trying to stay away from just opening and saving it as a .csv is cause I want to select certain data from the table which I want to convert to a separate .csv document. I will look into .net though.

Member Avatar for iamthwee

.net has the drawback that you need excel installed on the machine you're running your program from.

I actually got an idea. I am think of writing a program in vba to create a new sheet with the information i need from the main sheet and then maybe use a macro to convert the new sheet to .csv. The only problem is I dont know vba ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.