I am having trouble saving a spreadsheet.
This spreadsheet has already been copied
I am using the line
    $excel->Workbooks(1)->SaveAs($sp_full)  or ($excel_res = 0, $ew_message = "Could not save spreadsheet <$sp_full>");
To try and find out why I used the following two lines to get the error number and corresponding message
$en_num = Win32::GetLastError(); $en_f = Win32::FormatMessage($en_num);
I get the error number of 317 but $en_f does not contain anything
I then get a dialog box asking if I want to save the changes to the spreadsheet.
If I add the line, before trying to save, of $excel->{DisplayAlerts}=1;
I get a message indicating that the file is there and asking if I want to overwrite it.
Can anyone suggest why this is happening and how I can cure the problem?

In reply to Error 317 saving spreadsheet by merrymonk

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.