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

Free Support Forum - aspose.com

Create excel using Aspose c# and import data from query List

hello,
I am looking to create an excel sheet using Aspose cells and import data from the query List from Database and download the result output excel on browser. I would like to put the default header column names and based on the header column name I want to insert the respective data under each column name cell. (Note: the data in the list vary with the count, can be exact column header count or less).

Please help me how to achieve.

Thanks in Advance.

@kiran5388,

Aspose.Cells supports to import data from a variety of objects/sources, e.g. DataTable, Arrays, ArrayList, Custom Objects, GridView, HTML data, JSON, etc. For your requirements, you got to use your own .NET code by yourselves to extract data from your database to fill data into any of above mentioned objects. Once you fill your filtered data into the objects, then you may import data from the objects/source into the worksheet(s) using Aspose.Cells APIs. Finally you may save the Excel file or response Excel workbook (as inline/attachment) into the browser on the fly via Aspose.Cells APIs. See the document with examples on data importing options provided by Aspose.Cells APIs for your reference.

Hope, this helps a bit.

Sure. Thank you for quick response

@kiran5388,

You are welcome.