MFC and COM... 
Author Message
 MFC and COM...

Hi,
    OK, I've been programming with MFC for just over a year now, and I
think I have a good handle on windows programming in general. I have a
deadline for a program I'm writing, and they want me to put support for
Excel files in it... meaning learn COM in two days....

   Ummm... impossible...

Is there anyone out there that can show me how to write an Excel file?
All it needs to have in it is numbers. In the old days it would be easy,
write a few structs, fill in some numbers and presto!
I will learn COM, but not now. If some one could _explicitly_
demonstrate how to write an XL file in VC++ I could be persuaded to give
a reward... (small sum of money, I am a poor student...).

Any Help would be appreciated,
Harvey Hawes



Mon, 31 Jul 2000 03:00:00 GMT  
 MFC and COM...

Checkout the COMEXCEL sample shipped on your vc5 CD...
Hope that will help...


Quote:
>Hi,
>    OK, I've been programming with MFC for just over a year now, and I
>think I have a good handle on windows programming in general. I have a
>deadline for a program I'm writing, and they want me to put support for
>Excel files in it... meaning learn COM in two days....

>   Ummm... impossible...

>Is there anyone out there that can show me how to write an Excel file?
>All it needs to have in it is numbers. In the old days it would be easy,
>write a few structs, fill in some numbers and presto!
>I will learn COM, but not now. If some one could _explicitly_
>demonstrate how to write an XL file in VC++ I could be persuaded to give
>a reward... (small sum of money, I am a poor student...).

>Any Help would be appreciated,
>Harvey Hawes



Tue, 01 Aug 2000 03:00:00 GMT  
 MFC and COM...

I can't believe you think reading/writing the file would be easier than
using COM!

Even with a learning curve involved, COM will be easier to implement.  And
even if it was not, COM will be easier to maintain.  What happens when the
file structure changes for excel?  You have to rewrite the code to support
both file structures!  The interface to Excel, should remain relatively
stable.

Tell your bosses it can't be done in two days and learn COM, it can't be
done in two days anyhow.

Quote:

>Hi,
>    OK, I've been programming with MFC for just over a year now, and I
>think I have a good handle on windows programming in general. I have a
>deadline for a program I'm writing, and they want me to put support for
>Excel files in it... meaning learn COM in two days....

>   Ummm... impossible...

>Is there anyone out there that can show me how to write an Excel file?
>All it needs to have in it is numbers. In the old days it would be easy,
>write a few structs, fill in some numbers and presto!
>I will learn COM, but not now. If some one could _explicitly_
>demonstrate how to write an XL file in VC++ I could be persuaded to give
>a reward... (small sum of money, I am a poor student...).

>Any Help would be appreciated,
>Harvey Hawes



Tue, 01 Aug 2000 03:00:00 GMT  
 MFC and COM...

I would take a look at the example COMEXCEL.
For me it helped a lot.
I assume you use MS++ 5.0, (SP3 advised)
otherwise you have to look for other examples.

Good Luck.

Dirk.

Quote:

>Hi,
>    OK, I've been programming with MFC for just over a year now, and I
>think I have a good handle on windows programming in general. I have a
>deadline for a program I'm writing, and they want me to put support for
>Excel files in it... meaning learn COM in two days....

>   Ummm... impossible...

>Is there anyone out there that can show me how to write an Excel file?
>All it needs to have in it is numbers. In the old days it would be easy,
>write a few structs, fill in some numbers and presto!
>I will learn COM, but not now. If some one could _explicitly_
>demonstrate how to write an XL file in VC++ I could be persuaded to give
>a reward... (small sum of money, I am a poor student...).

>Any Help would be appreciated,
>Harvey Hawes



Tue, 01 Aug 2000 03:00:00 GMT  
 MFC and COM...

You can use Excel to save to other (more readable formats).  Save it off as a DBF file or something, and you'll have a much easier
time.  Reading and writing DBFs is pretty easy.  You could also save it as CSV which appears to be a comma separated list.  This
workaround might buy you the time to do it the hard way using COM.  Then again, this might just be good enough as is.

The last thing I would try to do is read and write the Excel format directly.  I'm sure there are so many gross hacks in there that
it would be impossible.  I don't like COM, but that's probably the only feasible approach if you have to read the files directly.

Hi,
    OK, I've been programming with MFC for just over a year now, and I
think I have a good handle on windows programming in general. I have a
deadline for a program I'm writing, and they want me to put support for
Excel files in it... meaning learn COM in two days....

   Ummm... impossible...

Is there anyone out there that can show me how to write an Excel file?
All it needs to have in it is numbers. In the old days it would be easy,
write a few structs, fill in some numbers and presto!
I will learn COM, but not now. If some one could _explicitly_
demonstrate how to write an XL file in VC++ I could be persuaded to give
a reward... (small sum of money, I am a poor student...).

Any Help would be appreciated,
Harvey Hawes



Tue, 01 Aug 2000 03:00:00 GMT  
 MFC and COM...

I havn't played with it at all but there is an Excel ODBC driver. I imagine
it will let you read a file but I don't know about write.  You mght want to
check it out.   You can use a CRecordSet and the class wizards make it a
breeze.

Quote:

>Hi,
>    OK, I've been programming with MFC for just over a year now, and I
>think I have a good handle on windows programming in general. I have a
>deadline for a program I'm writing, and they want me to put support for
>Excel files in it... meaning learn COM in two days....

>   Ummm... impossible...

>Is there anyone out there that can show me how to write an Excel file?
>All it needs to have in it is numbers. In the old days it would be easy,
>write a few structs, fill in some numbers and presto!
>I will learn COM, but not now. If some one could _explicitly_
>demonstrate how to write an XL file in VC++ I could be persuaded to give
>a reward... (small sum of money, I am a poor student...).

>Any Help would be appreciated,
>Harvey Hawes



Tue, 01 Aug 2000 03:00:00 GMT  
 MFC and COM...

No money required chum !! Just download an Excel ActiveX control from
the net. and embed it in your app. Learning to embed these controls is
damn easy ( 2 hours job !!)

On Thu, 12 Feb 1998 23:41:56 -0700, Harvey Hawes

Quote:

>Hi,
>    OK, I've been programming with MFC for just over a year now, and I
>think I have a good handle on windows programming in general. I have a
>deadline for a program I'm writing, and they want me to put support for
>Excel files in it... meaning learn COM in two days....

>   Ummm... impossible...

>Is there anyone out there that can show me how to write an Excel file?
>All it needs to have in it is numbers. In the old days it would be easy,
>write a few structs, fill in some numbers and presto!
>I will learn COM, but not now. If some one could _explicitly_
>demonstrate how to write an XL file in VC++ I could be persuaded to give
>a reward... (small sum of money, I am a poor student...).

>Any Help would be appreciated,
>Harvey Hawes



Mon, 14 Aug 2000 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. MFC and COM

2. ATL or MFC for com

3. Experienced C++/MFC/NT/COM developer

4. MFC and COM

5. MFC vs COM

6. mfc and COM server

7. newbie decision, mfc, activex, com, atl

8. MFC and COM with events

 

 
Powered by phpBB® Forum Software