Is it possible to convert a Excel file from *.xls into *.xlsx in C++?
But not in C# using .NET Framework.
And without using instances of Microsoft Excel.
it is possible, yes.
1) excel can do it
2) c++ can do pretty much anything that can be done on a computer, and nothing here is that exotic, its a binary file in, binary file out, bit of gibberish in the middle to convert it. The few things c++ can't do are not even remotely in this area of coding needed to pull it off.
so that proves it can be done. Not everything that can be done, should be done, of course.
ill give you a simpler example, as M$ formats are bloated and confusing.
say you wanted to convert a bitmap to a tga. you would read the file in, extract the RGB array of image data, and its dimensions etc from the header, then write the new header for the new type with the dimensions etc and data. This one is easy, its just different header formats on the data blob. But you do it the same way, you pull the original apart into its parts and then build the new file with those parts, using some default for anything that you didn't have in the old file, discarding anything you didn't need, etc. But its going to be crazy complex... you have the cell data, macros, formulae, embedded passwords, fonts, cell formatting, and probably hundreds of other bits of info that you have to extract from the original and insert correctly into the new one. There can be embedded buttons and such, basic code, and more to handle! Cell colors. Column widths. Merged cells. I think you can even add images and sounds. Author's personal info stolen from their pc is embedded. File version. ... yuck!
pretty much lol. Take a look though -- the M$ suite embeds everything knows about you if not told to stop doing that. Or it used to. Maybe privacy laws caught up to them now.