LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default CSV formatted text file to Excel

Hi all,
I am writing a small VC++ application of how to import the CSV
formatted
..txt file to excel. I am facing problem while parsing the text file.

"TicketNo","CarNo","PersonAge"
12534 , 763534 , 23
12345 , 624333, 24

The problem is in MFC there is a SetValue2(CoeVariant:column data)
method in which if i will pass an array(12534) then it will be
imported to excel.For example IfI will search for the "employee
number" field in text file then the values passed to SetValue2()should
be 12543 and 12345.But Using C++ I cannot do so as I have to read the
values rowwise(record by record) from the text file.I tried to return
a vector(to return integer values-12345).But I got 80 errors as
probably VC++ -6.0 is not compatible to the same.
1.My Main problem is how to extract values for "TicketNo"--12534 and
12345 from the text file to my application.
2.How to skip the header after reading the same?
3.Do I have to use some other method of MFC? Does anybody know there
exists a
AfxExtractSubstring() function in MFC.As I tried to search in MSDN but
couldnot got it?
Do anybody have sample source code for the particular application then
it may prove helpful for me?

Bubunia
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSV file doesn't save "xEy" style number as text formatted data [email protected] Excel Discussion (Misc queries) 1 July 30th 08 06:03 PM
Converting formatted text into a txt file Marc Excel Discussion (Misc queries) 1 June 21st 07 04:00 PM
Reading in poorly formatted text file Some Dude Excel Discussion (Misc queries) 1 February 11th 07 10:24 PM
Converting 'General' formatted cells to Text formatted cell using. Zahid Khan Excel Worksheet Functions 1 March 12th 05 07:13 PM
Creating properly formatted text file from vbscript using excel data msnews.microsoft.com[_7_] Excel Programming 2 December 18th 03 09:33 PM


All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"