title: Access to Excel export Error 2302 can't save the output data to the file you've selected
body: <p>I was trying to export A report from Access to Excel using the code below.</p>
  
  <pre><code>   pat = CurrentProject.Path
      Set xlo = CreateObject("Excel.Application")
      Nname = "MonthlyData" &amp; Left(Now(), 5)
   DoCmd.OutputTo acOutputReport, "MonthlyAll", "Excel 97 - Excel 2003 Workbook (*.xls)", pat &amp; "\" &amp; Nname &amp; ".xls", True
  </code></pre>
  
  <p>It works fine in my system but isn't working on any other I have tried since.
  I am not able to export to any other excel formats in my system as well.
  I have the following references selected in my system,</p>
  
  <p>Visual Basics for Applications
  Microsoft Access 15.0 object Library 
  OLE Automation
  Microsoft Office 15.0 Access  database engine object Library 
  Microsoft Excel 15.0 object Library 
  Microsoft Office 15.0 object Library </p>
  
  <p>I haven't checked for these references yet.
  Not sure if that is the reason. I am using windows 10 which is not the problem. I have checked for compatibility.</p>