DC_ADSQuery() CSV export when Excel is not installed

This forum is for eXpress++ general support.
Post Reply
Message
Author
reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

DC_ADSQuery() CSV export when Excel is not installed

#1 Post by reganc »

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?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: DC_ADSQuery() CSV export when Excel is not installed

#2 Post by reganc »

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.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Post Reply