|
|
Регистрация Восстановить пароль |
Повторная активизация e-mail |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
|
Опции темы | Поиск в этой теме |
28.07.2009, 20:44 | #11 |
Пользователь
Регистрация: 20.06.2008
Сообщений: 45
|
OK...I figured it out, the second parameter in Array(Array(1, 2) should be changed to 1
I have one more question: How do I prevent the import of the text files which have already been analyzed? The text file names are recoded in the columns C of the A+B workbook. I need this small modification to the macro given above. I guess the code should check if the name of the text file to be imported is already present in this column...I ask for your help in adding this modification because the workbook cycles through all the available text files whenever I start the macro - even if there in only ONE new file in the folder that needs to be analyzed. |
29.07.2009, 06:12 | #12 | |
Старожил
Регистрация: 05.12.2007
Сообщений: 4,180
|
We have subline of the code FieldInfo:=Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 2),Array(6, 2)).
In each Array(x, y) - x is number imported column, y - is option. There is explanation in reference (Help for VBA Excel): Цитата:
That macro processed all files in folder (without the ".txt" suffix), line of the macro's code Код:
Код:
Код:
Чем шире угол зрения, тем он тупее.
Последний раз редактировалось SAS888; 29.07.2009 в 07:10. |
|
29.07.2009, 19:51 | #13 |
Пользователь
Регистрация: 20.06.2008
Сообщений: 45
|
thank you!!! I used the correction that you provided to record the file without the TXT suffix but it continues to record them this way. How can this be corrected?
Hoping to hear form you soon!)) |
29.07.2009, 19:54 | #14 |
Пользователь
Регистрация: 20.06.2008
Сообщений: 45
|
BTW that part of the macro which checks if the text files has already been analyzed - works perfectly!)
THANK YOU VERY MUCH FOR IT!) |
30.07.2009, 04:48 | #15 |
Старожил
Регистрация: 05.12.2007
Сообщений: 4,180
|
Do you want to write the name of the processed files without the TXT suffix in cell of worksheet? This possible, but then compare the current filename with names, which is processed already, will not comfortable. Or do you want something another? Where are names without the TXT suffix must be written?
Чем шире угол зрения, тем он тупее.
|
30.07.2009, 17:11 | #16 |
Пользователь
Регистрация: 20.06.2008
Сообщений: 45
|
thanks you - I just need ot record text file names without the ".TXT" suffix - I will rename the records of the files which have already been analyzed. There needs to be no change for the location of the files - only the names of the recorded files should change to be pure - without TXT.
Thank you for your continuing help and I hope to hear form you soon! |
31.07.2009, 06:09 | #17 |
Старожил
Регистрация: 05.12.2007
Сообщений: 4,180
|
If I have understood You it is correct, that You need for following:
You should change code Код:
Код:
Чем шире угол зрения, тем он тупее.
|
01.08.2009, 00:23 | #18 |
Пользователь
Регистрация: 20.06.2008
Сообщений: 45
|
Thank you very much!))))) Got home very late this evening - going to test it tomorrow and let you knwo how it goes....Have a great weekend!)
|
02.08.2009, 00:01 | #19 |
Пользователь
Регистрация: 20.06.2008
Сообщений: 45
|
thanks! I checked and it work but that part of the macro that looks for the file names does not appear to be working now (as it is searching for the full text name while it should look for the clean filename, without TXT suffix)....do I change this line:
Find(what:=FName, LookAt:=xlWhole) to Find(what:=Left(FName, Len(FName) - 4), LookAt:=xlWhole) Thanks again! |
03.08.2009, 04:50 | #20 |
Старожил
Регистрация: 05.12.2007
Сообщений: 4,180
|
Just so. If we write the name of the files without TXT suffix, signifies and search for it is necessary also.
Чем шире угол зрения, тем он тупее.
|
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Data Validation | HTR | Microsoft Office Excel | 2 | 28.03.2009 18:17 |
ощибка в import | Yurka | Общие вопросы по Java, Java SE, Kotlin | 1 | 11.12.2008 14:20 |
Data Explorer | gotex | БД в Delphi | 12 | 05.05.2008 22:04 |
Data | neas | Помощь студентам | 1 | 03.03.2008 16:26 |
import из excel | Toxa | Общие вопросы Delphi | 2 | 25.03.2007 19:53 |