Hi,
i have written a C++code and i have 9 output txt files. However, i need these outputs in one excel with 9 workspaces. Is there a easy way to do that? Also, how can i put what i want to each cell of excel workspace?
Yes, M$ Excel has a C\C++ API however the learning curve is prohibitively steep. Unless you plan on writing an entire add-on package then I would suggest that you take a different route. Since you require these documents to be collated in an Excel document, I would recommend any number of scripting languages such as powershell, VBS\VBA, python etc. Even if you don't know any of these right now, you could easily gain an advanced understanding of any one of them I've listed in roughly half the time it would take you to garner a functional understanding of the Excel object in C\C++. If you really require a finer grain of control then what a scripting language offers then I understand that C# is a not so painful solution, although I don't have any personal experience with it.
@
do you need it to communicate or do you just want them to be in there?
If you just want to dump them there you could split your columns with tabs, your rows with newlines and just copy everything... :')
If not, good luck with it, others may be able to help you better.
This thread shows code doing basic operations on Excel using the COM-based Automation API. If you aren't familiar with COM then you will have a steep learning curve!!
Thanks for help,
Hopefully, i won't read any data from excel, i have used two text files for reading and i will only write them out to excel but i will need 9 pages of excell in one excel document. How do i do this and
@Gamer2015 i have done what you sugggested but they are still in one column with tab seperated :/
Thank you, that is solved now, only thing i need is tohave 9 pages of outputs in nine pages of 1 excel. Is there any way to do this without library or i can have your suggestions,