|
-
March 18th, 2004, 08:50 AM
#1
Newbie Qusetion: How can i send results to Excel?
Hi Guys,
I am fairly new to prgramming MFC and i was just wandering if anyone knew/if its possible to send results from my app to excel.
I am running an app that gives different numbers as a result and i want to send this to excel so i can sort through the results but don't know how?
-
March 18th, 2004, 09:44 AM
#2
Re: Newbie Qusetion: How can i send results to Excel?
Originally posted by Ankoump
Hi Guys,
I am fairly new to prgramming MFC and i was just wandering if anyone knew/if its possible to send results from my app to excel.
I am running an app that gives different numbers as a result and i want to send this to excel so i can sort through the results but don't know how?
justy search this site for "excel automation". you'll get plenty of results
-
March 18th, 2004, 09:59 AM
#3
Do I really need to go in the automation process. I mean when I did console programming, all you need was to write to a .csv file and use the fout<< statement to send it there….
Is there no simlar way in MFC, I have searched but there is no relating answer..
-
March 18th, 2004, 10:24 AM
#4
ODBC can write to Excel too.
-
March 18th, 2004, 12:19 PM
#5
A CSV file is a type of Excel file. You can use it if you only write.
CSV is still available for MFC.
If you need to write to an XLS or do read/write, you will need
to use automation or ODBC.
Automation is simple (but tedious)
Did you think that because you were using MFC you couldn't use
the CSV file???
-
March 18th, 2004, 12:35 PM
#6
Use CStdioFile::WriteLine to generate a csv file, then launch the file in Excel with this:
Code:
::ShellExecute(m_hWnd, _T("open"), strFileName, NULL, NULL, SW_SHOW);
where strFileName is the name of the csv file. This will use the association of the csv extension with Excel to open the file in Excel.
This is a one way flow of data from your app to Excel. If you need anything more sophisticated, then Automation is your best bet.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|