Skip to main content
Solved

Problem Excel Write Function

  • December 4, 2019
  • 4 replies
  • 168 views

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

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.

 

Regards,

Mischa

4 replies

mohansx
Forum|alt.badge.img+5
  • Former AIMMSian
  • 223 replies
  • December 4, 2019

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 

https://how-to.aimms.com/Articles/45/45-share-project-files.html


Mischa
AIMMSian
Forum|alt.badge.img+6
  • AIMMSian
  • 29 replies
  • Answer
  • December 6, 2019

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.

 

Regards,

Mischa


Patrick
Administrator
Forum|alt.badge.img+6
  • Administrator
  • 54 replies
  • December 16, 2019

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


  • Author
  • Newcomer
  • 1 reply
  • December 17, 2019

@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