0

My application generates a .xls file whose content is HTML. When this file is opened in newer versions of office i get the following error.

Error screenshot

If i open the file and save as .xls by changing the type from web page to .xls the error is removed.

From this ----> To this

Is there any way to do this using a program in c# or any other technology (Without using any third party library is more preferred)

1 Answers1

0

You could create a CSV file which is readable in Excel without libraries (as e.g. shown in Generate CSV file in ASP.NET), or a XLS file using a library (as e.g. shown in this question).

user7217806
  • 2,014
  • 2
  • 10
  • 12