Hi everyone! I just want to open an excel file and save it as a text file.
I think it would be simple but i don't know it.( i want it for 1000 files and because of that i need C++ help)
Does this have to be C\C++? it's braindead easy in VBS or Powershell and a waking nightmare in C\C++. The problem is that Excel is a zip file format structured like a mini database. Open it up with 7-zip one day, it's not pretty.
there are some third party tools out there that can supposedly do this from the command line so a batch file for each file in the folder would knock it out.
No, excel does not have a CLI for this. Excel supports basic for advanced macros and buttons and widgets.
You may be able to drag and drop a number of the files into excel at once and have it open a bunch of them at once, then figure out some way to save them all to csv. Seems clunky.
You can open an excel file as an object in c++ and then use the automation methods et al to access the spreadsheet cells, ranges etc. Consider for Office 2010 for a Windows 7 laptop as an example only:
This obtains some numeric data from a spreadsheet and puts it into an array for processing.
Depending upon the spreadsheet layout, then obviously the method of extraction might change etc. Once you can extract it from the spreadsheet, then saving it to a text file is fairly easy.