After generating the excel file, it can be successfuly opened in Excel 2003 but in Excel 2007 and 2010, I am seeing the below warning message. Is there a way to suppress the below warning message.
"the file you are trying to open is in a differenet format than specified by the file extension. verify that the file is not corrupted and is from a trusted source before opening the file. do you want to open the file now?"
nagiah
Member
18 Points
49 Posts
Excel extension hardening
Feb 20, 2012 10:40 PM|LINK
Hi
I am trying to generate excel using CarlosAg. Below is the code.
Workbook workBook = new Workbook();
Worksheet workSheet = workBook.Worksheets.Add("WorkSheet1");
WorksheetRow workSheetRow = workSheet.Table.Rows.Add();
WorksheetCell workSheetCell = new WorksheetCell();
workSheetCell.Data.Text = "xxx";
workSheetRow.Cells.Add(workSheetCell);
workBook.Save(@"C:\Users\UN\Desktop\Cd\CarAgExtHard\CarAgExtHard\Test.xls");
After generating the excel file, it can be successfuly opened in Excel 2003 but in Excel 2007 and 2010, I am seeing the below warning message. Is there a way to suppress the below warning message.
"the file you are trying to open is in a differenet format than specified by the file extension. verify that the file is not corrupted and is from a trusted source before opening the file. do you want to open the file now?"
Thank You,