how to copy specific data from a file to excel?

gvgbabu

Member
Joined
Sep 22, 2013
Messages
11
Programming Experience
Beginner
hi everybody,

i am new bie in vb 2010 programming

i am opening and reading a text file and paste the entire file to excel.

But i want to copy only certain data in the text file to excel.

Is it possible ? if yes please guide me

for example

i have a text file with lot of data

some data
.......
.......
.......
JOINT COORDINATES
-----------------
COORDINATES ARE METE UNIT

JOINT X Y Z


1 0.000 0.000 5.203
2 0.000 0.000 9.015
3 0.000 0.000 12.933
......
......
965 17.505 12.400 14.360
966 12.132 12.400 14.360


************ END OF DATA FROM INTERNAL STORAGE ************

some data
........
........
........
........
........

i want to extract data starting from 1 to 966 rows and paste in the excel file
one more thing rows are not constant always ie it may 1200, 2000, 1500.

please guide me

thanks in advance

gvg
 
You're not pasting anything unless you're using the Windows Clipboard. Are you using the Clipboard? Can you show us the code that you're using at the moment? Depending on what you're doing, the code to read and write the data may not change at all and you simply need to put a conditional statement somewhere in between.
 

Latest posts

Back
Top