Cells.ImportArrayList

Cells.ImportArrayList method

Imports an arraylist of data into a worksheet.

public void ImportArrayList(ArrayList arrayList, int firstRow, int firstColumn, bool isVertical)
ParameterTypeDescription
arrayListArrayListData arraylist.
firstRowInt32The row number of the first cell to import in.
firstColumnInt32The column number of the first cell to import in.
isVerticalBooleanSpecifies to import data vertically or horizontally.

Examples

using System;
using System.Collections;
using Aspose.Cells;

namespace AsposeCellsExamples
{
    public class CellsMethodImportArrayListWithArrayListInt32Int32BooleanDemo
    {
        public static void Run()
        {
            Workbook workbook = new Workbook();
            Cells cells = workbook.Worksheets[0].Cells;
            
            ArrayList data = new ArrayList();
            data.Add("Name");
            data.Add("Age");
            data.Add("City");
            
            cells.ImportArrayList(data, 0, 0, false);
            
            data.Clear();
            data.Add("John");
            data.Add(30);
            data.Add("New York");
            
            cells.ImportArrayList(data, 1, 0, false);
            
            workbook.Save("ImportArrayListDemo.xlsx");
        }
    }
}

See Also