Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

C++ and MS Excel

AML24AML24 Member Posts: 2
Hi,

I've written some programs in C++ before which open and write to plain text files. However, I was wondering if it is possible to do the same with MS Excel files. If it is possible, is there any way to control which cells text will be written to?

I've tried searching the Internet for some possible solutions but the few which I have found are quite unclear. (By the way, I am using MS Office XP)

Any help would be greatly appreciated. Thanks so much!

Comments

  • stephlstephl Member Posts: 422
    : Hi,
    :
    : I've written some programs in C++ before which open and write to plain text files. However, I was wondering if it is possible to do the same with MS Excel files. If it is possible, is there any way to control which cells text will be written to?
    :
    : I've tried searching the Internet for some possible solutions but the few which I have found are quite unclear. (By the way, I am using MS Office XP)
    :
    : Any help would be greatly appreciated. Thanks so much!
    :
    I think it is possible to communicate with the Excel program thanks to DDE (Dynamic Data Exchange). With this protocol, it is possible to refresh the values in an Excel sheet, these values being calculated by your program that transmits them to the Excel program through DDE. I have never used that myself, I read it in a book (I'm not sure, it may be Charles Petzold's book about Windows programming).
    Sorry, I cannot tell you more.
    What concerns the idea of directly modifying a XLS file, you have to know how the file is structured and I do not know where to find such information.

    Steph
  • dwccgcdwccgc Member Posts: 576
    : Hi,
    :
    : I've written some programs in C++ before which open and write to plain text files. However, I was wondering if it is possible to do the same with MS Excel files. If it is possible, is there any way to control which cells text will be written to?
    :
    : I've tried searching the Internet for some possible solutions but the few which I have found are quite unclear. (By the way, I am using MS Office XP)
    :
    : Any help would be greatly appreciated. Thanks so much!
    :

    http://www.codeproject.com/database/cspreadsheet.asp


  • AML24AML24 Member Posts: 2
    Thanks for all your help
    :)
Sign In or Register to comment.