This project has moved and is read-only. For the latest updates, please go here.

How to insert row into sheet with values from string[] or object[]

Sep 4, 2013 at 8:51 AM
Edited Sep 4, 2013 at 10:03 AM
my code:
      sheetTires.Cells[1, 1].Value = "Код";
      sheetTires.Cells[1, 2].Value = "Марка";
      sheetTires.Cells[1, 3].Value = "Модель";
      sheetTires.Cells[1, 4].Value = "Сезонность";
      sheetTires.Cells[1, 5].Value = "Размер";
      sheetTires.Cells[1, 6].Value = "Шип";
      sheetTires.Cells[1, 7].Value = "Индексы";
      sheetTires.Cells[1, 8].Value = "Остатки на складе";
      sheetTires.Cells[1, 9].Value = "Остатки поставщиков";
      sheetTires.Cells[1, 10].Value = "Опт";
      sheetTires.Cells[1, 11].Value = "Розница";
better code:
sheetTires.Row(1).LoadFromArray(new string[] { "Код", "Марка", "Модель", "Сезонность", "Размер", "Шип", "Индексы", "Остатки на складе", "Остатки поставщиков", "Опт", "Розница" });
because without index
Explain me please how can do this.