Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

how to paste from right side of columns in excel using texttocolumn in vb.net

$
0
0
I have a problem while copy a certain text in between some lines from a file and paste in the excel using vb.net. In the text some rows with 9 columns, some 8 columns and other with 7 columns of data.
i am able to copy the required text from a file to excel but when using texttocolumns in vb.net in excel it paste like this starting from the left column. for example:

3 12 2 1073.91 -0.1 1.7 0.02 -5.14 -0.5
14 -1067.73 0.1 -1.7 -0.02 1.74 0.29
13 2 787.99 16.39 2.16 -0.12 -4.22 21.28
14 -781.81 -16.39 -2.16 0.12 -0.1 11.5


But i want to pate from right side columns. For example i am showing only 3 rows. Actually more rows of data required paste in excel more.

3 12 2 1073.91 -0.1 1.7 0.02 -5.14 -0.5
14 -1067.73 0.1 -1.7 -0.02 1.74 0.29
13 2 787.99 16.39 2.16 -0.12 -4.22 21.28
14 -781.81 -16.39 -2.16 0.12 -0.1 11.5

how to do this. please help me

i used the following syntax in the program:

.columns(1).TextToColumns( _ Destination:=.Cells(1, 1), _ DataType:=Excel.XlTextParsingType.xlDelimited, _ TextQualifier:=Excel.XlTextQualifier.xlTextQualifierDoubleQuote, _ ConsecutiveDelimiter:=True, _ Tab:=True, _ Semicolon:=False, _ Comma:=False, _ Space:=True, _ Other:=False, _ TrailingMinusNumbers:=False)

PLEASE SEE THE ATTACHMENT. GIVE ME SUGGESTIONS.
gvg
Attached Images
 

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>