complete
Active member
- Joined
- Oct 24, 2012
- Messages
- 34
- Programming Experience
- 3-5
I have some C# code that opens and writes to XLS files and CSV files. During the process of writing to the XLS files workpages and workbook, etc., I get this message on my computer where I am doing development.
Now, here is where it gets interesting. This does not happen on my boss' computer when I give him the Release executable of my program. So, on my machine, there must be some sort of version of Excel I have locally that is more advanced (or less advanced). I am able to still do development by using the handy "#if DEBUG" condition where I minimize the window to allow the user to click on the Continue button in the pop up displayed here above.
#if DEBUG
this.WindowState = FormWindowState.Minimized;
wb2.Save();
this.WindowState = FormWindowState.Normal;
#endif
#if !DEBUG
wb2.Save();
#endif
But it would be best to change this code to something where I am able to do a query on the system and get the version of Excel installed and then handle this appropriately.
Now, here is where it gets interesting. This does not happen on my boss' computer when I give him the Release executable of my program. So, on my machine, there must be some sort of version of Excel I have locally that is more advanced (or less advanced). I am able to still do development by using the handy "#if DEBUG" condition where I minimize the window to allow the user to click on the Continue button in the pop up displayed here above.
#if DEBUG
this.WindowState = FormWindowState.Minimized;
wb2.Save();
this.WindowState = FormWindowState.Normal;
#endif
#if !DEBUG
wb2.Save();
#endif
But it would be best to change this code to something where I am able to do a query on the system and get the version of Excel installed and then handle this appropriately.