Aspose excel spreadsheet to Dataset

Hi,

Is there a way to import data from a aspose excel spreadsheet to a dataset. I see the other way around is available; i.e. dataset to spreadsheet using the importdataview function (I looked at the demo application).

The sole reason that I downloaded the trial version yesterday is to see if I could do this.


Thanks,

Elsie.


Forum: Aspose.Excel.Web
Posted: : Tuesday, April 19, 2005 8:18 AM [GMT -8]
Post Subject: : Questions about Aspose.Excel.Web

Laurence wrote:
1.Can we load and save an excel file directly into aspose excel web?
Yes.
2.Can we add formulas too?
Currently the answer is no. But we are working to support formula in Aspose.Excel.Web.

@chettiar_elsie,
Aspose.Cells has replaced Aspose.Excel that is no more actively developed now and is discarded. You can use Aspose.Cells to import data in a variety of ways including to DataSet. Here is a sample code that demonstrates the creation of DataSet from an Excel file.

string filePath = "Book1.xlsx";

// Instantiating a Workbook object
Workbook workbook = new Workbook(filePath);

// Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.Worksheets[0];

// Exporting the contents of 11 rows and 2 columns starting from 1st cell to DataTable
DataTable dataTable = worksheet.Cells.ExportDataTable(0, 0, 11, 2, true);

DataSet dataSet = new DataSet();
dataSet.Tables.Add(dataTable);

More information can be retrieved from the following link:
Export Data from Worksheet

The new product can be downloaded here for free trials:
Aspose.Cells for .NET (Latest Version)

Get a ready to run solution here having multiple examples demonstrating different features of this product.