sending data to Excel

This is a multi-part message in MIME format.

------=_NextPart_000_0054_01C3DECE.A3899D40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Guys,
I am using VC++ and I would like to be able to connect to Excel and send =
it data to fill a spreadsheet.
It is very easy stuff I need to do but I have no idea what functions and =
libraries do I need.

Thanks for your help.
Charlie.

------=_NextPart_000_0054_01C3DECE.A3899D40
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Guys,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am using VC++ and I would like to be =
able to=20
connect to Excel and send it data to fill&nbsp;a =
spreadsheet.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It is very easy stuff I need to do but =
I have no=20
idea what functions and libraries do I need.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Charlie.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0054_01C3DECE.A3899D40--

0
1/19/2004 10:55:51 AM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
462 Views

Similar Articles

[PageSpeed] 38

>"Charlie" <dukecharlie@yahoo.com> wrote ...
>Hi Guys,
>I am using VC++ and I would like to be able to connect to Excel and send it
data to fill a >spreadsheet.
>It is very easy stuff I need to do but I have no idea what functions and
libraries do I need.
>
>Thanks for your help.
>Charlie.



You can write to excel spreadsheet much like to a database table with an
odbc driver. There's an example at
http://www.codeguru.com/mfc_database/index.shtml (The Microsoft Excel
section)


0
spam1 (174)
1/19/2004 2:39:09 PM
Does connecting via ODBC allow you to set cell colors and widths too though?

Lisa

"Aleksandar Vukelja" <spam@spam.com> wrote in message
news:e5Oz8np3DHA.2556@TK2MSFTNGP10.phx.gbl...
>
> >"Charlie" <dukecharlie@yahoo.com> wrote ...
> >Hi Guys,
> >I am using VC++ and I would like to be able to connect to Excel and send
it
> data to fill a >spreadsheet.
> >It is very easy stuff I need to do but I have no idea what functions and
> libraries do I need.
> >
> >Thanks for your help.
> >Charlie.
>
>
>
> You can write to excel spreadsheet much like to a database table with an
> odbc driver. There's an example at
> http://www.codeguru.com/mfc_database/index.shtml (The Microsoft Excel
> section)
>
>


0
no6060 (315)
1/19/2004 5:05:27 PM
"Lisa Pearlson" <no@spam.plz> wrote in message
news:e7uio5q3DHA.3196@TK2MSFTNGP11.phx.gbl...
> Does connecting via ODBC allow you to set cell colors and widths too
though?
>
> Lisa

No.

One way to interface with excel is by importing the .tlb or .olb that ships
with excel, another way is creating MFC wrappers.

The first is done using #import.

The second is done using the classwizard. Open the classwizard, and press
the 'Add Class ...' button; then select 'From a type library ...'. Select
the .olb or .tlb that ships with excel (eg excel8.olb). Then select the com
classes/interfaces that you wish to wrap.
You will probably want to at least wrap _Application, _Workbook, _Worksheet,
Workbooks, Worksheets, Range, Font, Interior, ...

Tom.

> "Aleksandar Vukelja" <spam@spam.com> wrote in message
> news:e5Oz8np3DHA.2556@TK2MSFTNGP10.phx.gbl...
> >
> > >"Charlie" <dukecharlie@yahoo.com> wrote ...
> > >Hi Guys,
> > >I am using VC++ and I would like to be able to connect to Excel and
send
> it
> > data to fill a >spreadsheet.
> > >It is very easy stuff I need to do but I have no idea what functions
and
> > libraries do I need.
> > >
> > >Thanks for your help.
> > >Charlie.
> >
> >
> >
> > You can write to excel spreadsheet much like to a database table with an
> > odbc driver. There's an example at
> > http://www.codeguru.com/mfc_database/index.shtml (The Microsoft Excel
> > section)
> >
> >
>
>


0
1/19/2004 7:13:44 PM
Check out:
http://support.microsoft.com/default.aspx?scid=kb;en-us;196776

    Gerry Murphy

>"Charlie" <dukecharlie@yahoo.com> wrote ...
>Hi Guys,
>I am using VC++ and I would like to be able to connect to Excel and send it
data to fill a >spreadsheet.
>It is very easy stuff I need to do but I have no idea what functions and
libraries do I need.
>
>Thanks for your help.
>Charlie.



0
1/19/2004 10:37:25 PM
"Charlie" <dukecharlie@yahoo.com> wrote:

>Hi Guys,
>I am using VC++ and I would like to be able to connect to Excel and send it data to fill a spreadsheet.
>It is very easy stuff I need to do but I have no idea what functions and libraries do I need.

You can find some sample code here
http://support.microsoft.com/default.aspx?kbid=253235

Hans
0
hajue.ude (60)
1/19/2004 11:53:15 PM
Reply:

Similar Artilces:

How do I send copies emails without sending attachments?
I send emails with attachments to our bank. My boss wants a copy of the email but not a copy of the attachment. How do I do that? Steve Bramblett wrote: > I send emails with attachments to our bank. My boss wants a copy of the > email but not a copy of the attachment. How do I do that? Each recipient gets the SAME copy of the e-mail. If you want different recipients to get different versions of your e-mail, you have to send different e-mails. ...

Data Security & Flash Drive Formatting
Last week I placed some sensitive files on a flash drive for a brief period (two or three hours) before deleting them. At this point, I'd like to make sure that these deleted files CANNOT be recovered, and I know there are tools out there that *can* restore deleted files. I need to make sure that any such tools will NOT be able to recover the files in question. So, I'm wondering if a "low-level" format operation would flip all the 1's to 0's (so to speak), such that these files would be certainly unrecoverable. Would formatting do the trick? And wo...

no data to return blank
I currently have this formula =IF(C8>0,C8-$G$3,"") in a series of cells which is fine when there is information but I get a # value error when there is nothing in the cells it looks to. Is there a way to have it leave the cell blank if there is no data in the cells it looks to? -- A. when i test this formula using blank cells for c8 & g3 i get a blank cell as a result. how is your sheet arranged? "Andmor" wrote: > I currently have this formula =IF(C8>0,C8-$G$3,"") in a series of cells which > is fine when there is information ...

No message in outbox
I tried to send a message with 1Mb attachment to 40 recipients in the bcc field. It gave me an error message from the isp's server, the message was NOT sent (I've checked), it did NOT arrive in Sent Items, but neither is it in the Outbox any more. I can send and receive email successfully. Problem is, every few minutes Outlook tells me it's sending message 1 of 1, it fails and gives me the same error message. Yet there is no message in the Outbox. But what happened to the original message when it first failed to send? I guess it's 'stuck' somewhere but I can...

Bin and sort a large list of data
I have a large list of data that i need to go through for my job. what i want to do is organize the numbers into bins, then elimintate any numbers that are identical. does anyone have any ideas? Hi, Sort the data into the number order. Let's say that is in column A. Then in the first free column, make the first cell 0, and then do in row 2 =IF (A1=A2,1,0) This will then equal zero on the first line of a new number. Then Copy, Paste Special, Values on this column of ones and zeros, and then sort on it. The data at the top will be a unique list of numbers. You can just the...

Sending mail from selected email address
Hi All, As I have 4 email accounts set up in Outlook, I understand that I can send mail from each or any account. The accounts are listed under tools / Send and Receive / then each of the accounts. How can I choose which account to send from so that the recipient see's who I want it to be from?? Hope that explains it. Regards Alan On Sat, 16 Apr 2005 21:10:48 -1000, The Fatman <albaxter@optushome.com.au> wrote: > Hi All, > > As I have 4 email accounts set up in Outlook, I understand that I can > send > mail from each or any account. > > The acco...

Sending a macro to another PC-how?
How do you send a macro you've written to another PC so that they can save it in their Personal.xls file (at Program Files\Microsoft Office\Office\XLStart)? You can export a macro and save it, to do this from your workbook, right-click the workbook's icon and pick View Code. This icon is to the left of the "File" menu this will open the VBA editor, click on the module you want to save and go to file and export file, then save it to a floppy or what ever you backup to, then import it to the new workbook. -- Paul B Always backup your data before trying something new Using ...

change the colour of the "invert if negative" option in Excel
How do I change the colour of the "invert if negative" option for charts in Excel? (e.g., use green for positive and red for negative numbers) Checking the "invert if negative" box does change the colour, but without an option as to what colour to be used Hi, For explanation on how to control invert colour. http://www.andypope.info/charts/Invertneg.htm This approach is not possible in xl2007. Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Luci" <Luci@discussions.microsoft.com> wrote in message news:03173739-0D7A-4037-8C5...

Data validation doesn't work if contents is added by pasting
Hi I've data validation set so that only the number 1 can be entered, but even this cannot be entered if an adjacent cell is a certain value. this works for direct entry, but not if the value is pasted in or added using the "drag handle". Is there any way to stop this happening as I just know somewones going to try and fill all the cells by draging the values down. Regards Jeff Jeff, You could disable "Allow cell drag and drop" in Tools | Options or... copy the following code, right click the sheet tab and choose 'view code'. Paste the code into the modu...

Sending mail from remote location
my mail works great while at home. when I go on the road I can receive ail but not send. I get the following error message: Subject 'SKIDOO MACH Z 800LT (long track / long tunnel) (Jackson)', Account: 'Jeff', Server: 'smtp.charter.net', Protocol: SMTP, Server Response: '571 imp11 smtp.charter.net OTcuMTQ3LjE2LjIzMA== You must connect from Charter IP space. E1110', Port: 25, Secure(SSL): No, Server Error: 571, Error Number: 0x800CCC61 It worked on my last laptop and I have not been able to figure it out on this one. I can't remember what I...

Send and Recieve Fix
For a long time I had a problem with my Send/Recieve function in Outlook. This happended in both Outlook 2000 and my current version - 2007. I found I had to re-boot my computer to perform a Send/Recieve in Outlook. Otherwise the sequence would start then stop and say it could not perform due to an error. After extensive Internet and News Group research I decided it was time to run a check on disk errors. This Windows XP facility seemed to have fixed my Outlook problem. I did this about a few months ago now and I have since had no problems with my send and recieve. Unfortunately I do have ...

Excel to Email
Hi Our sales people need to send to our sales manager on a daily basis a list of the sales orders that they created for that day. I created a private view named 'Daily Sales Orders' and showed each person to export to Excel. I was wondering if anyone knows of an easier way to do this. I would ideally like to mail merge or email template something similar. Ideally it would be nice for a sales people to create an email an insert their list for that day. Appreciate any suggestions. Thanks Mark As a thought, SQL Reporting can be configured to send a report, by email automatical...

Unable to send?
Hi, I've got MOOL, and i"m usign ti with outlook. The emails that I'm sending are just "stuck" in the outbox? Can anyone give me an idea of what's going on? Rex Did it ever work? Are you able to receive? -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP Roland Schorr & Tower http://www.rolandschorr.com Microsoft OneNote FAQ: http://www.factplace.com/onenotefaq.htm **I apologize but I am unable to respond to direct requests for assistance. Please post questions and replies here in the newsgroup. Mahalo! "Rekks" <rex_flynn@hotmail.com> wrote ...

How do I merge two files in Excel?
How do I merge two Excel files, each with a different name and different data? Thanks...Mike Hi you may provide some more details: - data layout - HOW you want to merge them - etc -- Regards Frank Kabel Frankfurt, Germany "Chem303" <Chem303@discussions.microsoft.com> schrieb im Newsbeitrag news:BACC8208-C906-4B80-A3B7-6DFD260C00A4@microsoft.com... > How do I merge two Excel files, each with a different name and different > data? Thanks...Mike ...

Sending messages in Outlook
We have a user that everytime that she sends an email she will get booted out of Outlook. The email does go through, but she will have to get out of Outlook. When she goes back into Outlook, everything is fine until she sends another message. Any help would be appreciated. ...

No Permission to Send/Receive Email???
I just replaced our server hardware, upgraded to WS 2k3 Enterprise and created a new domain. I transferred the client files and desktop on our desk/laptop computers over to the new domain. We do NOT have Exchange installed yet, but use Outlook 2002 with the email etc. saved on the client. One one client machine (mine), the email, calendar, etc are there, but when I hit the Send/Receive button, I get a message saying that I don't have permission to perform this operation. Also when I try and change the automatic check for email option it tells me I don't have permission. ...

Send Do Not Send
When I attempt to email via a print server - OutLook Express displays the message "A program is attempting to email on your behalf" Send or Do Not Send - How do you prevent this from happening? And just automatically send? ...

Automatic Data Changes
I have a work sheet that I use to monitor dates. I need to track up to 5 dates at a time. I would like my worksheet to update automaticaly when I change the dates. Let me explain. The data in A4 through A12 never changes. The data in B4 through B12 changes weekly. I need to track the last 5 changes made to B4 through B12. ex. Lets say B4=10/20/09. I then change B4 to 11/2/09. I want the data from B4 to go to C15. so C15 will be 10/20/09. Then when I change B4 to 11/16/09, I want C15 to automatically update to 11/2/09 and C16 to update to 10/20/09. and so on for 5 dates....

How to find the owner of the active excel workbook
Dear Smart People, I'm sure this has been asked before but I'm not able to find the answer. In Visual Basic, how may I find the name or system ID of the owner of the currently active workbook? I apologize if this is an "old" question but I've not been able to gleen the answer. Thank you! Janet Take a look at the BuiltInDocumentProperties to see if you can find what you want there. I'm not sure you can get the "Owner", but you can find who last modified the document. -- HTH, Barb Reinhardt "Janet Panighetti" w...

View other BU data
Hi, Let say there are 4 BU define in my systems and name it as BU1 up to BU4 accordingly. And each BU has manager and sales person that is different from other BU. Is it possible that BU1 manager can see all lead, opportunity for BU2? But BU2 manager cannot see the BU1 lead and opportunity?? Thx, Carrie Hi, yes it is possible by using different security roles for the two different sales managers (they have different access rights and should therefore have different roles). It is also possible using BU hierarchy and placing the managers in a aggregate BU or in the bottom one dependin...

Exchange 2003, Windows Server 2003, Data Centre Environment
Interesting title to a somewhat uninteresting post. I've just signed up for this, using the Windows Live Mila desktop beta, and just want to test things are working ok! Hello! Adam Laslett wrote: > Interesting title to a somewhat uninteresting post. > I've just signed up for this, using the Windows Live Mila desktop beta, > and just want to test things are working ok! > > Hello! > SOB. ...

Sending on behalf... Exchange 2003
Hi everyone, Is there a better way to give a few users the ability to send mails also from the info@domain.com mailbox without having them logout and login to a different Outlook 2003 profile... Or without the text sending on behalf of... So my question is, Is there an easy way that a user can select another e-mail address and send mails out...? Thanks a lot in advance!! Regards, BY On Thu, 05 Oct 2006 12:57:12 GMT, "BY" <nospam@mail.com> wrote: >Hi everyone, > >Is there a better way to give a few users the ability to send mails also >from the info@dom...

What was Outlook sending?
Hi, I downloaded my messages using the option "send and receive all". However, the "Show Progress" box indicates that I was also 'sending something'. But I had nothing to send! I look in the "Sent items' folder and nothing was sent at this time. What was Outlook 2003 doing? Santista The usual response here is, "You have a virus". It could be that a virus program is using your Outlook to send spam and/or a copy of itself to people in your address book. I hope this is not the case, but please have the foresight (aftersight?) to look into ...

Linking spreadsheets and creating new lines of data
I just finished creating a very large workbook with over twelve years of daily market data. The first spreadsheet in the workbook contains historical data of 16 market indicators. The next 15 spreasheets use data from the 16 market indicators found on the first spreadsheet. I'm trying to automate the process I go through daily updating the spreadsheets with the most current data. For example, say tomorrow morning I manually entered todays S&P 500 Closing Price in cell A4051 on the first spreadsheet. The second spreadsheet has several formulas that use the number entered in cell A...

appending data from text file with different column orderings
I'm interested in appending data to an Access table without having tobe constrained by the order of the columns in an external file. Forinstance, if I have a table with 4 fields - A, B, C, D - I would liketo be able to have my external file in any column order, say D, C, B,A. Is this possible without programming?>From what I've seen, it seems that I would have to have my externalfile ordered the same as the table - A, B, C, D - and I'd like to haveindependence of the table ordering.Denis On Mar 14, 4:37 pm, John Nurick <j.mapSoN.nur...@dial.pipex.com>wrote:> Hi Denis,...