+ Reply to Thread
Results 1 to 2 of 2

How to pass FieldInfo parameter to Workbooks::OpenText(...) in VC+

  1. #1
    Lily
    Guest

    How to pass FieldInfo parameter to Workbooks::OpenText(...) in VC+

    Hi,

    I am using Excel Automation from VC++ MFC code, I need to read .txt file and
    display in Excel, I have some data like 1234E2, I wish to to display it as
    "1234E2", but currently it is displayed as 123400. I need to disable this
    scientific convertion. I studied the OpenText(...) function, and find that we
    can specify the fieldinfo to do correct read. but I don't know how to pass
    parameter for FieldInfo. anybody can help?

    thks a lot in advance.

    Lily,


  2. #2
    Dave Peterson
    Guest

    Re: How to pass FieldInfo parameter to Workbooks::OpenText(...) in VC+

    I don't use VC++, but if you open excel and record a macro when you open that
    text file (and choose the correct field types), you'll see what excel expects.

    Lily wrote:
    >
    > Hi,
    >
    > I am using Excel Automation from VC++ MFC code, I need to read .txt file and
    > display in Excel, I have some data like 1234E2, I wish to to display it as
    > "1234E2", but currently it is displayed as 123400. I need to disable this
    > scientific convertion. I studied the OpenText(...) function, and find that we
    > can specify the fieldinfo to do correct read. but I don't know how to pass
    > parameter for FieldInfo. anybody can help?
    >
    > thks a lot in advance.
    >
    > Lily,


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1