I have eXPress++ (c) Version 2.0 Build 262 installed at present. Excel is not installed on my development PC.
When using DC_ADSQuery, if I click the Excel button and it offers to export to CSV instead, the CSV output is unusable.
The CSV written in my case was :
{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... },{ ... }
I can see this is probably due to the format of the array that is passed to dc_Array2CSV being wrong, but I don't have the time to dig too much.
Is there a fix for this?
DC_ADSQuery() CSV export when Excel is not installed
DC_ADSQuery() CSV export when Excel is not installed
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com
Real Business Applications Ltd
http://www.rbauk.com
Re: DC_ADSQuery() CSV export when Excel is not installed
Actually, I tried a quick change and it then worked.
In _dcads.prg I changed the line below:
DC_Array2Excel( @cExcelFile, {aData}, nOrientation, ;
lDisplayAlerts, lVisible, lAutoFit )
to:
DC_Array2Excel( @cExcelFile, aData, nOrientation, ;
lDisplayAlerts, lVisible, lAutoFit )
removing the brackets around the aData parameter.
I put the brackets back and then changed in _dcfunct.prg the line in dc_array2excel from
RETURN DC_Array2CSV(cExcelFile,aData)
to
RETURN DC_Array2CSV(cExcelFile,aData[1])
and it worked fine.
In _dcads.prg I changed the line below:
DC_Array2Excel( @cExcelFile, {aData}, nOrientation, ;
lDisplayAlerts, lVisible, lAutoFit )
to:
DC_Array2Excel( @cExcelFile, aData, nOrientation, ;
lDisplayAlerts, lVisible, lAutoFit )
removing the brackets around the aData parameter.
I put the brackets back and then changed in _dcfunct.prg the line in dc_array2excel from
RETURN DC_Array2CSV(cExcelFile,aData)
to
RETURN DC_Array2CSV(cExcelFile,aData[1])
and it worked fine.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com
Real Business Applications Ltd
http://www.rbauk.com