Skip to Content
0
Former Member
Dec 01, 2009 at 06:23 PM

OLE - TEXT TO COLUMNS

470 Views

Hi Experts,

I was trying to implement the 'TEXT TO COLUMNS' functionality of excel through OLE concept. But the method is failing during the conversion (TEXT TO COLUMNS operation).

I had done Macro-recording while manually performing this operation in excel sheet .The macro coding is given below. Can some one help in implementing the same functionality using ABAP coding.

Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _

TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _

Semicolon:=True, Comma:=False, Space:=False, Other:=False, FieldInfo _

:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), TrailingMinusNumbers:= _

True

PS:- I already have a program in place which converts semi-colon seperated txt files to XLS files using OLE. I need to create a similar program using the above said concept as i feel

this type of conversion requires lesser time.

Regards,

Kiran