Read here about managing Excel and Word Documents.
I'm receiving the following error:System.Runtime.InteropServices.COMException (0x80040154)
The message is:
"System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {F24F2CEB-1D90-411B-B171-F911172FF9E8} failed due to the following error: 80040154.
at GeneXus.Office.ExcelDocumentI.checkExcelDocument()
at GeneXus.Office.ExcelDocumentI.Open(String xlName)
at GeneXus.Programs.agenerarexcel.executePrivate()
at GeneXus.Programs.agenerarexcel.Main(String[] args)"
Did you copy the Jakarta DLLs to your kbase DATA00x\bin directory as explained here?
I'm receiving the following error: System.BadImageFormatException: Could not load file or assembly 'file:///C:\kb\Dataxxx\web\bin\Jakarta.POI.dll' or one of its dependencies
The message is:
"System.BadImageFormatException: Could not load file or assembly 'file:///C:\kb\dataxxx\web\bin\Jakarta.POI.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'file:///C:\kb\Dataxxx\web\bin\Jakarta.POI.dll'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at GeneXus.Office.ExcelPoi.ExcelDocument.Init(String previousMsgError)
at GeneXus.Office.ExcelDocumentI.checkExcelDocument()
at GeneXus.Office.ExcelDocumentI.Open(String xlName)
at GeneXus.Programs.agenerarexcel.executePrivate()
at GeneXus.Programs.agenerarexcel.Main(String[] args)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. "
If you're running on 64bits OS, did you included "/platform:x86" in the "compiler flags" generator property?
I'm receiving the following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: <Model Directory>\web\gxoffice2.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
The message is:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Models\ExcelReport\JavaSQLServer003\web\gxoffice2.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
This error is thrown when the required libs are not included in the JAVA classpath.