Best way to take one line at a time from excel file

burnik

Новичок
Регистрация
04.05.2020
Сообщения
20
Благодарностей
2
Баллы
3
If I have an excel file from which I want the project to grab data from, how can I set it so that on the next execution it will take the next line?

Options I see:
1. Delete line after taking, and take the first one all the time.
This option will not work because I cannot delete the info, it must add info to it.

2. Move the line to the end, and take the first one all the time
This option would work, but would cause problems when multithreading (two instances might take the same line)

3. Create a textfile with numbers 1..2..3.. and delete each after taking. This will be a variable of the line in excel to take.
This option would work, but if the project fails - it would not return to that line.


Are there any other simpler ways of achieving this?

Thanks.
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
Import microsoft interop excel dll and be happy
 

Yann

Client
Регистрация
22.04.2017
Сообщения
207
Благодарностей
31
Баллы
28
Or option 3 and add line back if project fails using "BadEnd"
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)