Dear all,
I have one text file. i need extract specific text to Excel file. please find text file and sample excel file attachments. kindly solve with code.
Thanking you all,
Best regards.
Dear all,
I have one text file. i need extract specific text to Excel file. please find text file and sample excel file attachments. kindly solve with code.
Thanking you all,
Best regards.
Last edited by pvsvprasad; 08-20-2016 at 06:43 AM.
Hi.
This should do it. You'll just need to change the file path to the correct location.
(Also Column 2 the Concrete strength is 25 MPa not 30 MPa as shown in your example solution!)
![]()
Please Login or Register to view this content.
Happy with my advice? Click on the * reputation button below
Last edited by pvsvprasad; 08-20-2016 at 06:45 AM.
This version should open a dialogue box for you to select the file
![]()
Please Login or Register to view this content.
You could try:
Alf![]()
Please Login or Register to view this content.
You asked for
and that is what you got. If this was not what you wanted you got a post from crooza that hopefully is what you wish for and not what you asked for.a code by choosing file location dialog box pop (Instead of "C:\temp\")?
Alf
Yes it extracts the text file as a workbook in order to get the data you require. What exactly isn't working?
This will close the text file afterwards if that is what the issue is
![]()
Please Login or Register to view this content.
Please find InputText file. please solve this bug.
OK A couple of things
1. You've changed the format of your file. You've moved your input data around into different columns. For this example I put your data BACK into your original columns AB and AC
2. You're now asking for different data to be searched for. In your original file you had data that matched your search file so there was no need to check if there wasn't a match, now you're seeking to find only a subset which means I need to code around that for the instances where there is no match
3. Your latest example has 'new' column data with three columns of returned data - what s the 2000 and the 230? are you seeking to collect that data too.
The attached file represents your original file (and its format) but I've added your latest input data list. It extracts only what it can find and skips the rest. It presumably will work multiple times if your search data is in different text files. Just run it again and select the next text file to search in.
Yes sir, i am apologies for sending wrong moved column data.your prepared code for columns, i.e AD and AE columns are correct.
yes sir, i need columns for 2000 and 230 also required. but for those columns i have used one old code.so please combine your latest code with my old code with minor corrections.
in my old code having some bugs. there is developing some repeating rows and not maintained output rows as ascending order with respect to "Z' Column(i.e, 1,2,3,4,5 etc)
my old code for X to AC column as below:
kindly make suitable correction to form exact code or make a New code by your way of style by selecting .anl text file format.please find of Exact format of sample Output excel file.![]()
Please Login or Register to view this content.
thank you for your kind help.
,
with best regards.
Last edited by pvsvprasad; 08-22-2016 at 02:37 AM.
![]()
Please Login or Register to view this content.
Dear sir, thank you for kind reply. you code is nice. minor bugs are arrived. please fix these bugs.
1)AB column is starting from Y column. i.e Y to AE columns
2)Please make out put data as a Ascending order with basis of of Z column. kindly find the sample excel file.
3)And some of Rows are printed duplicates with respect to Z column members.
please find exact form of Output excel file.
kindly make these corrections, rest of all your code is good.
Thanking you sir,
Best regards.
Last edited by pvsvprasad; 08-22-2016 at 03:31 AM.
please find Exact format of Excel format file and Raw data text file.
Thanking you,
Best regards.
You must learn the meaning of "BUGS".
I've just worked on your first post. I haven't even looked at the rest of the posts.
![]()
Please Login or Register to view this content.
Dear sir,
i have expressed extreme apologies for using of that word. sorry for poor technical knowledge.i will edit my posts.
now your code is perfect.thank you for preparing.please make small correction. i.e out put should be producing as ascending order with respect to Z column order.example based upon Z should produced from lowest value to highest value(1,2,3,4, etc).
please find sample output excel file.
thanking you,
Best regards.
Last edited by pvsvprasad; 08-22-2016 at 03:33 AM.
change
to![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Deleted wrong thread.......................
Last edited by jindon; 08-22-2016 at 03:47 AM.
I can't open a ZIP file but it looks like JINDON has this well and truly covered now. You should ensure you add to his reputation as he/she has done a lot o work to sort this out for you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks