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

Free Support Forum - aspose.com

Export to Excel (.xlsx) from Datatable in Asp.net and push to Response object without saving into directory

Hi All,

I am trying to exporting the Excel (xlsx) from Datatable and then push to HTTP response whithout saving any file into local or temporary location.

Thanks in Advance.



Thanks for your query.

I think Aspose.Cells APIs can serve your needs well. You may first import datatable to Excel spreadsheet via Aspose.Cells, see the document for your reference:

Finally, you may save the spreadsheet to HTTP response object easily in your Asp.NET application, see the document for your reference:

Hope, this helps a bit.

Thank you.

Hi Amjad,

Thanks for your reply.

I could ale to generate the exsx file with HTML enabled content.

Now I am facing the issue with html content styles in xlsx.

In html we have font size, width height and bullet point is presented but in xlsx its missing.

Can you please suggest me to go further?



Could you provide us template HTML file here, we will check it soon.

By the way, can you open the HTML file into MS Excel manually (if MS Excel opens the file fine) and then re-save it as Microsoft Excel spreadsheet (e.g XLSX/XLS). Now open the generated XLSX file again into MS Excel separately and check if you see the same issue too. For your information, Aspose.Cells follows MS Excel standards and specifications when reading/writing HTML files and its conversion (HTML to Excel). Generally, Aspose.Cells supports MS Excel oriented HTML file and it would render the file in the same way as MS Excel does.

Thank you.