Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: subhankar pandey
  Where is subhankar pandey?
 Kolkata
 India
 subhankar pandey
 Tags
Subject: RE: TextToColumns issue
Thread ID: 210649 Message ID: 210971 # Views: 31 # Ratings: 0
Version: Visual FoxPro 6 Category: Active X Controls & OLE Automation
Date: Thursday, January 08, 2009 4:39:00 PM         
   


Subhankar,
I am amazed with your understanding. Given the code needed to fill arrFieldInfo I thought you could apply to your case (though I prefer OpenText). Anyway here is the sample with TextToColumns:
#Define xlDelimited	1
#Define xlFixedWidth	2
#Define xlDoubleQuote 1

#Define xlGeneralFormat	1
#Define xlTextFormat	2
#Define xlMDYFormat	3
#Define xlDMYFormat	4
#Define xlYMDFormat	5
#Define xlMYDFormat	6
#Define xlDYMFormat	7
#Define xlYDMFormat	8
#Define xlSkipColumn	9
#Define xlEMDFormat	10

TEXT TO myText noshow
"0001","VFP7",01/01/2002,"skipme",30/01/2003,001
"0002","VFP8",01/31/2003,"skipme",29/02/2000,002
"0002","C#",01/31/2003,"skipme",29/02/2000,002
ENDTEXT

Dimension arrFldInfo[6,2]
For ix=1 To 6
  arrFldInfo[m.ix,1]=m.ix
Endfor
arrFldInfo[1,2]=xlTextFormat
arrFldInfo[2,2]=xlTextFormat
arrFldInfo[3,2]=xlMDYFormat
arrFldInfo[4,2]=xlSkipColumn
arrFldInfo[5,2]=xlDMYFormat
arrFldInfo[6,2]=xlTextFormat

ox = Createobject('Excel.Application')
ox.Workbooks.Add()
ox.Visible = .T.
With ox.ActiveWorkbook.ActiveSheet
  _Cliptext = m.myText
  .PasteSpecial(.Range('A1'))
  .Application.Selection.TextToColumns(.Range('A1'), xlDelimited, ;
    xlDoubleQuote, ,,,.T.,,,, @arrFldInfo)
Endwith


Cetin Basoz



COMPLETE THREAD
TextToColumns issue Posted by subhankar pandey @ 1/7/2009 7:04:15 AM
RE: TextToColumns issue Posted by Anil Sharma @ 1/7/2009 8:14:58 AM
RE: TextToColumns issue Posted by subhankar pandey @ 1/7/2009 1:01:44 PM
RE: TextToColumns issue Posted by Yousfi Benameur @ 1/7/2009 2:10:33 PM
RE: TextToColumns issue Posted by subhankar pandey @ 1/8/2009 5:32:17 AM
RE: TextToColumns issue Posted by Cetin Basoz @ 1/7/2009 2:15:19 PM
RE: TextToColumns issue Posted by subhankar pandey @ 1/8/2009 6:11:31 AM
RE: TextToColumns issue Posted by Cetin Basoz @ 1/8/2009 4:39:00 PM
RE: TextToColumns issue Posted by subhankar pandey @ 1/9/2009 6:49:09 AM
RE: TextToColumns issue Posted by Cetin Basoz @ 1/9/2009 6:21:23 PM
RE: TextToColumns issue Posted by Borislav Borissov @ 1/9/2009 7:27:13 PM
RE: TextToColumns issue Posted by subhankar pandey @ 1/10/2009 5:48:25 AM