After deleting the first line, record in the last line.

mat55

Seller
Регистрация
01.12.2021
Сообщения
25
Благодарностей
4
Баллы
3
After deleting the first line, record in the last line.
Please tell me how to do this.
 

ElonMusk

Client
Регистрация
02.01.2021
Сообщения
14
Благодарностей
5
Баллы
3
If it's a txt file. Taking the first line you have it in a variable. Use the "Write to file" option to save to the same file.
 

mat55

Seller
Регистрация
01.12.2021
Сообщения
25
Благодарностей
4
Баллы
3
Sorry, it's not a text file.
After deleting the first row of the Excel sheet, it is recorded in the last row.
Thank you.[/QUOTE]
 

BAZAg

Client
Регистрация
08.11.2015
Сообщения
1 786
Благодарностей
2 450
Баллы
113
After deleting the first line, record in the last line.
Please tell me how to do this.
C#:
var tb = project.Tables["tb"];

string[] row = new string [0];
lock(SyncObjects.TableSyncer) {
    tb.GetItem("0", true).ToArray(); // first row and delete
    tb.AddRow(row); // add to end
}

return string.Join("|", row); // return row to string
If there are no lines in the plate, it will exit along the red arrow.

99815
 
  • Спасибо
Реакции: ElonMusk

mat55

Seller
Регистрация
01.12.2021
Сообщения
25
Благодарностей
4
Баллы
3
C#:
var tb = project.Tables["tb"];

string[] row = new string [0];
lock(SyncObjects.TableSyncer) {
    tb.GetItem("0", true).ToArray(); // first row and delete
    tb.AddRow(row); // add to end
}

return string.Join("|", row); // return row to string
If there are no lines in the plate, it will exit along the red arrow.

Посмотреть вложение 99815
The first line is deleted.
But it is not recorded on the last line.
what am i doing wrong?
 

Вложения

BAZAg

Client
Регистрация
08.11.2015
Сообщения
1 786
Благодарностей
2 450
Баллы
113
The first line is deleted.
But it is not recorded on the last line.
what am i doing wrong?
Excuse me, please.
I made a mistake - corrected.
In 5 line.
C#:
var tb = project.Tables["tb"];

string[] row = new string [0];
lock(SyncObjects.TableSyncer) {
    row = tb.GetItem("0", true).ToArray(); // first row and delete
    tb.AddRow(row); // add to end
}

return string.Join("|", row); // return row to string
 
  • Спасибо
Реакции: mat55

mat55

Seller
Регистрация
01.12.2021
Сообщения
25
Благодарностей
4
Баллы
3
Excuse me, please.
I made a mistake - corrected.
In 5 line.
C#:
var tb = project.Tables["tb"];

string[] row = new string [0];
lock(SyncObjects.TableSyncer) {
    row = tb.GetItem("0", true).ToArray(); // first row and delete
    tb.AddRow(row); // add to end
}

return string.Join("|", row); // return row to string
it is complete.
It was very helpful.
Thank you.
 
  • Спасибо
Реакции: BAZAg

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