Problem Excel Write Function

  • 4 December 2019
  • 4 replies

Dear community, 

even if the excel is not an read only file I always receive this error. Do you have any advices how to avoid them ?

Maybe it’s a read-only file and I just can’t see it?





Thank you!!


Lars Wohlan


Best answer by Mischa 6 December 2019, 16:15

View original

4 replies

Userlevel 5
Badge +5

Hello @larseline , you only included the .aimms file in your attachment. That doesn’t let us see what code is giving this error. Please attach the full project as detailed in

Userlevel 3
Badge +6

Are you sure that, next to trying to save the Excel workbook using AIMMS, you do not have the workbook open in Excel itself at the same time? That would explain this error message, as Excel would then ‘lock’ the workbook.




Userlevel 4
Badge +6

Hi @larseline , wonder if @Mischa 's and/or @mohansx 's answers helped you? Thanks for sharing.

@Patrick @Mischa @mohansx  Sorry for the late reply.

Yes I still had the workbook open. So I had the option to close the workbook and open it afterwards again.

As I didn’t like that option I created an Excel supportfile and a VBA code now copies the data from the closed supportfile workbook to my working file.


Thank you for your support!



Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator