disable popup message while opening excel with dataRSS

1 reply

Last post Sep 12, 2018 07:09 AM by deepakpanchal10

  • disable popup message while opening excel with data

    Sep 11, 2018 08:08 AM|paspulatep|LINK

    Hi Team,

    I am able to extract the data in excel sheet, but opening the excel file it popup with below message.

    "The file format and extension of 'CAD_All_Report.xls' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyways"

    I am using the below code in Classic ASP to open the excel file with data.

    Response.ContentType="application/vnd.ms-excel"

    Response. AddHeader="Content-Disposition","attachment"; filename=CAD_All_Report.xls"

    Could you please help me out to disable the popup message(remove).

    Thanks & Regards

    Praveen paspulate

  • Re: disable popup message while opening excel with data

    Sep 12, 2018 07:09 AM|deepakpanchal10|LINK

    Hello paspulatep,

    I think the issue is more related to Excel. Your code open the excel using Excel’s default setting and Excel popup the message. And as far as I know, we could not add extra code to change the Excel’s setting in the code.

    According to the error message, I would suggest try to check if adding your CAD_All_Report.xls as a trust source in Excel could resolve the issue.

    Best Regards,

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.