Kbase P147655: Unable to open a .CSV file with OpenOffice using ActiveX Automation
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/9/2009 |
|
Status: Unverified
SYMPTOM(s):
Unable to open a .CSV file with OpenOffice using ActiveX Automation
.CSV files are ignored
Same code opens .ODS and .XLS files in OpenOffice as expected
FACT(s) (Environment):
Using third-party OpenOffice product
Using loadComponentFromURL method to open files in OpenOffice
loadComponentFromURL method expects an array object containing property information about the .CSV file to be opened
Progress 9.x
OpenEdge 10.x
Windows
CAUSE:
It is not possible to do this in the ABL. The loadComponentFromURL method is expecting an array of properties that sets up the file type (Filtername) and any flags required (FilterFlags). Whilst it is possible to define the individual properties in the ABL, there is no way to pass them to the loadComponentFromURL method, because:
- The array that is passed to the loadComponentFromURL method is defined as an Object but there is no concept like this in the ABL. An ABL array construct is not an object.
- Although a COM-HANDLE is used to reference the object, the COM-HANDLE itself is not the object (it is just a reference to an object) so cannot be passed into the loadComponentFromURL method.
FIX:
One possible way to get this working would be to create a wrapper DLL in VB. The wrapper would allow the required parameters to be passed and generates an array object that could be used in the loadComponentFromURL method. Exact steps to do this are outside of the technical support that Progress provides but working VB6 code is provided below as a potential starting point.