View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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