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

Free Support Forum - aspose.com

Can ASPOSE Cells create a true .XLS file

Hi All,

I'm just starting out looking at ASPOSE.CELLS as a solution to a problem I'm having and before I get started I want ot know if it can create a true .XLS or .XLSX file i.e. one that is not just an XML file renamed to .XLS.

My problem is that my client has a requirement to create spreadsheets from data stored in SQL Serer database via a web interface. Have their users make changes to the spreadsheets then load their contents back to the database.

We have tried the following;

Utilising OLEDB to write data to preexisting excel workbooks, this fails to suit because the data written is all text (i.e. numbers as text) and some large numbers are converted to scientific notation.

Utilising COM INTEROP, fails because it doesn't really work on a server based environment.

Creating teh spreadsheets by writing the XML, works brilliantly except out standard method of loading data from excel is via OLEDB which fails to process the spreadsheet when it is of the XML format.

I have some other solutions that I know will work but I'd rather get a component to do the work for me. So I'm looking for a component that can run as part of a .net web application serverside on Windows Server 2008 64bit and that can create TRUE .XLS or .XLSX files.

Does Aspons.Cells meet these requirements?



Hi Adrian,

Yes! Aspose.Cells is fully capable of creating True Excel files. It is possible to get data from and write to MS SQL table. There several methods available in Aspose.Cells. Following are the direct link for detailed information.


Code snippet:
//Creating a new DataTable object
DataTable dataTable = new DataTable();
//Adding specific columns to the DataTable object
dataTable.Columns.Add("ProductName", System.Type.GetType("System.String"));
dataTable.Columns.Add("CategoryName", System.Type.GetType("System.String"));
dataTable.Columns.Add("QuantityPerUnit", System.Type.GetType("System.String"));
dataTable.Columns.Add("UnitsInStock", System.Type.GetType("System.Int32"));

//Exporting the data of the first worksheet of the Grid to the specific DataTable object
dataTable = gridDesktop1.Worksheets[0].ExportDataTable(dataTable, 0, 0, 69, 4, true);

If you face any sort of issue, feel free to approach us with the problem description. We will guide you through.



I will further add to Salman Shakeel’s previous answer.

If you need a simple library/component (without any interface or grid like control), we have Aspose.Cells component that is very powerful to manipulate Excel spreadsheets. It can also import or export from and to variety of data sources, it is optimized with performance and you can create or handle large files with it - it is very efficient in this regard, you may see the following links for your reference:


Thank you.