Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
text to excel -Help
Hello all,
I have a text file as below which i need to convert to excel ... ID=ANALOG2:TIC3601, PD=REACTOR 1 JACKET TEMP CONTROLLER, DB=1, SR=10, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 2 JACKET TEMP CONTROLLER, DB=2, SR=20, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 1 CORE TEMP CONTROLLER, DB=2, SR=30, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 2 CORE TEMP CONTROLLER, DB=1, SR=10, RC=216; It should look like this in excel with columnwise with header,is there a code please help ID PD DB SR RC ANALOG2:TIC3601 REACTOR 1 JACKET TEMP CONTROLLER 1 10 216 ANALOG2:TIC3601 REACTOR 2 JACKET TEMP CONTROLLER 2 30 216 ANALOG2:TIC3601 REACTOR 1 CORE TEMP CONTROLLER 2 30 216 ANALOG2:TIC3601 REACTOR 2 CORE TEMP CONTROLLER 1 10 216 Thanks A.kumar |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
text to excel -Help
I'd just import the text file into excel--delimited by commas.
Then select the first column edit|Replace what: ID= with: (leave blank) replace all Same thing with PD=, DB=, SR= and RC= and the final semicolon. And just add the headers manually. If you need to do this via a macro, you could record a macro when you do it once manually. Kumaras wrote: Hello all, I have a text file as below which i need to convert to excel ... ID=ANALOG2:TIC3601, PD=REACTOR 1 JACKET TEMP CONTROLLER, DB=1, SR=10, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 2 JACKET TEMP CONTROLLER, DB=2, SR=20, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 1 CORE TEMP CONTROLLER, DB=2, SR=30, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 2 CORE TEMP CONTROLLER, DB=1, SR=10, RC=216; It should look like this in excel with columnwise with header,is there a code please help ID PD DB SR RC ANALOG2:TIC3601 REACTOR 1 JACKET TEMP CONTROLLER 1 10 216 ANALOG2:TIC3601 REACTOR 2 JACKET TEMP CONTROLLER 2 30 216 ANALOG2:TIC3601 REACTOR 1 CORE TEMP CONTROLLER 2 30 216 ANALOG2:TIC3601 REACTOR 2 CORE TEMP CONTROLLER 1 10 216 Thanks A.kumar -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
text to excel -Help
using split "," then split "=" e.g. Dim k ' Split values ,array k = Split(Details(cnt), "|", -1, vbTextCompare) If UBound(k) 0 Then loSheet.Cells(Act, COL_INVOICE_DATE).Value = "Aging for " + k(1) + ":" loSheet.Cells(Act, COL_INVOICE_DATE).Select With Selection.Font .Name = "Times New Roman" .Bold = True End With Act = Act + 1 End If Dave Peterson wrote: I'd just import the text file into excel--delimited by commas. Then select the first column edit|Replace what: ID= with: (leave blank) replace all Same thing with PD=, DB=, SR= and RC= and the final semicolon. And just add the headers manually. If you need to do this via a macro, you could record a macro when you do it once manually. Kumaras wrote: Hello all, I have a text file as below which i need to convert to excel ... ID=ANALOG2:TIC3601, PD=REACTOR 1 JACKET TEMP CONTROLLER, DB=1, SR=10, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 2 JACKET TEMP CONTROLLER, DB=2, SR=20, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 1 CORE TEMP CONTROLLER, DB=2, SR=30, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 2 CORE TEMP CONTROLLER, DB=1, SR=10, RC=216; It should look like this in excel with columnwise with header,is there a code please help ID PD DB SR RC ANALOG2:TIC3601 REACTOR 1 JACKET TEMP CONTROLLER 1 10 216 ANALOG2:TIC3601 REACTOR 2 JACKET TEMP CONTROLLER 2 30 216 ANALOG2:TIC3601 REACTOR 1 CORE TEMP CONTROLLER 2 30 216 ANALOG2:TIC3601 REACTOR 2 CORE TEMP CONTROLLER 1 10 216 Thanks A.kumar -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
text to excel -Help
You sure this belongs in this thread?
moonhk wrote: using split "," then split "=" e.g. Dim k ' Split values ,array k = Split(Details(cnt), "|", -1, vbTextCompare) If UBound(k) 0 Then loSheet.Cells(Act, COL_INVOICE_DATE).Value = "Aging for " + k(1) + ":" loSheet.Cells(Act, COL_INVOICE_DATE).Select With Selection.Font .Name = "Times New Roman" .Bold = True End With Act = Act + 1 End If Dave Peterson wrote: I'd just import the text file into excel--delimited by commas. Then select the first column edit|Replace what: ID= with: (leave blank) replace all Same thing with PD=, DB=, SR= and RC= and the final semicolon. And just add the headers manually. If you need to do this via a macro, you could record a macro when you do it once manually. Kumaras wrote: Hello all, I have a text file as below which i need to convert to excel ... ID=ANALOG2:TIC3601, PD=REACTOR 1 JACKET TEMP CONTROLLER, DB=1, SR=10, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 2 JACKET TEMP CONTROLLER, DB=2, SR=20, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 1 CORE TEMP CONTROLLER, DB=2, SR=30, RC=216; ID=ANALOG2:TIC3601, PD=REACTOR 2 CORE TEMP CONTROLLER, DB=1, SR=10, RC=216; It should look like this in excel with columnwise with header,is there a code please help ID PD DB SR RC ANALOG2:TIC3601 REACTOR 1 JACKET TEMP CONTROLLER 1 10 216 ANALOG2:TIC3601 REACTOR 2 JACKET TEMP CONTROLLER 2 30 216 ANALOG2:TIC3601 REACTOR 1 CORE TEMP CONTROLLER 2 30 216 ANALOG2:TIC3601 REACTOR 2 CORE TEMP CONTROLLER 1 10 216 Thanks A.kumar -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Default font for pasted text in text boxes - Excel 2007 | Excel Discussion (Misc queries) | |||
Text not continuing to wrap for large block of text in Excel cell | Charts and Charting in Excel | |||
How to make text data export to excel in text format. | Excel Programming | |||
In Excel, option to enter text in cells the same as text boxes | Excel Worksheet Functions | |||
Excel VBA: Worksheet cell .Text property: 1024 bytes text len limit | Excel Programming |