Dear monks!

I currently had a similar problem (reading data from ~100 Excel-sheets), and of course I didn't want to manually click a dialog after each of them. Excel 2013 successfully detected that I was only reading them, however when migrating to Excel 2016, the annoying dialog appeared. Using the solution above prevents that dialog in Excel2016 :-)

Below is my code for your reference

Hope this helps! Rata

my $Excel = Win32::OLE->new('Excel.Application', 'Quit'); my $workbook = $Excel->Workbooks->OpenXML("someNameHere"); # + open file # some code here, only _reading_ from that workbook $Excel->{DisplayAlerts} = 0; # 1. not required for Exce +l 2013 $workbook->{Saved} = 1; # 2. not required for Exce +l 2013 $workbook->close(0); $Excel->Workbooks->Close();

In reply to Re win32::ole Excel 2016 quit without saving by Ratazong
in thread win32::ole excel savechanges by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.