Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

importing/exporting data from c++ to excel

Status
Not open for further replies.

itsh11

Programmer
Dec 16, 2004
3
US
I have data in the form of an array, i want to display it to the user in tabular form in excel, allow the user to make modifications to it and again get the modified data back into the the original array in c++. i want some guidance on this, how to deal with the exporting to excel and how to import the data back to c++. i will highly appreciate your help if you provide me some snippets of code also,

Thanks a lot
 
Well getting it to Excel is not a problem. Save it in an xls file using \n and tabs to separate rows and columns, then use ShellExecute to launch Excel to open the file. Getting it back would probably be more difficult. If you try to save it, it prompts you if you want to save it as a normal xls or whatever (since the way described above is not how xls is normally saved). The user would have to agree to save it, close Excel, and then go back to the program and tell it to load from the file, so it would open the xls file and read from it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top