|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to open, edit and export .txt file?
I have a .txt file that looks like this:
Code:
1999 1 1 12:00 73 5.3 the numbers stand for: year, month, date, time, temperature, and wind speed respectively. There are many more entries like this in the .txt file (about 1000). 3 Questions: 1. How do I use vbscript to go through every line and replace spaces with commas? Code:
1999,1,1,1200,73,5.3 2. If I want to add a value of -99 after a specific comma, for example, after "1200," how do i do this? 3. How do I export the above to an Access table? thank you very much. |
|
#2
|
|||
|
|||
|
I know in VB you can use the replace method to achieve this IE,
Replace(letters, "", ",") letters being the string variable That would work if there is only one whitespace inbetween each entry. Other wise it would replace each null value with a comma IE 1200,,,,12,,,12,,,13,2000 |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > how to open, edit and export .txt file? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|