Export data to excel in .NET Core

Pratham Jain 281 Reputation points
2023-01-28T14:37:20.9733333+00:00

Hi All,

I am developing an application in .NET Core with angular client. I have a scenario where user click on Download button and data from SQL Server will be exported to excel sheet in .NET Core WebAPI. The generated and downloaded sheet will display-

  1. Image on top left corner of sheet from Images folder in WebAPI. This image will be displayed in several cells based on its size. For example image can be stretched/displayed in 5 columns and 8 rows in excel.
  2. Data from SQL Server will be displayed just below above image in tabular format with headers in Navy blue color and text in white over them.
  3. The sheet will not have any default cell. It will display data in tabular format(generated from code) and each column will fit to the content size.

Please let me know how can I achieve the same ASAP.

Regards,

Pratham

Developer technologies ASP.NET ASP.NET Core
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.