Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Excel Interop

$
0
0

We were able to reproduce the problem and a fix has been created.

The problem is occurring because the SaveAs method uses optional parameters, as do a number of these Interop methods and if not actually supplied to the method the compiler was generating a null parameter instead of the expected value of System.Reflection.Missing::Value.

Please create a support incident and place my name in the description and I will ensure that it gets registered against the rpi so that I can get a fix to you when available.

In the meantime you can workaround the issue by specifying the parameters as follows, although you might have to do this for other Excel Interop methods as well.

invoke ExcelWorkBook::SaveAs("\temp\test1.xlsx"
                                       type System.Reflection.Missing::Value
                                       type System.Reflection.Missing::Value
                                       type System.Reflection.Missing::Value
                                       type System.Reflection.Missing::Value
                                       type System.Reflection.Missing::Value
                                       type XlSaveAsAccessMode::xlNoChange
                                       type System.Reflection.Missing::Value
                                       type System.Reflection.Missing::Value
                                       type System.Reflection.Missing::Value
                                       type System.Reflection.Missing::Value
                                       type System.Reflection.Missing::Value
                                       )

Thanks


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>