We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How can i insert data into a column

I have the following problem:
I have a list with some data (5 values). and i would like to insert that data in a specific location like from E11-E16 in excel. Can you please help me out.

Assuming that the column start position is retrieved dynamically.


Thanks for your query.

There are multiple ways to accomplish the task via Aspose.Cells APIs. If you have data into some arrays/list, you may directly import it via respective method, see the sample code for your reference:
Sample code:

   Workbook workbook = new Workbook("e:\\test2\\Book1.xls");
    //Instantiating new workbook
    //Workbook workbook = new Workbook();
         int row = 10;// eleven row.
         int col = 4; //E column
            Worksheet workbook = workbook.Worksheets[0];

            double[] XValues = { 2.4, 0.3, 0.2, 1.1, 2.3, 2.1};
             //Import data into E11:E16 range of cells.
            worksheet.Cells.ImportArray(XValues, row, col,true);

There are more data importing options for different data sources which Aspose.Cells supports, see the document for your reference:

Alternatively, you may insert data cell by cell into the worksheet. This is more like a manual way, see the document for your reference:

Hope, this helps a bit.