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

  • Автор темы Автор темы mat55
  • Дата начала Дата начала

mat55

Seller
Регистрация
01.12.2021
Сообщения
30
Реакции
5
Баллы
8
After deleting the first line, record in the last line.
Please tell me how to do this.
 
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.
 
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]
 
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
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?
 

Вложения

  • 2022-11-21_19h46_09.jpg
    2022-11-21_19h46_09.jpg
    82,3 KB · Просмотры: 179
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
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

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