Code: Select all
cExcelFile = M_ApplsPath+"\Inp_data\Out_transp.xls"
DC_WorkArea2Excel( cExcelFile,,,,,,,,, aColumnNames )
Code: Select all
cExcelFile = M_ApplsPath+"\Inp_data\Out_transp.xls"
DC_WorkArea2Excel( cExcelFile,,,,,,,,, aColumnNames )
Code: Select all
***** Записать транспонированный файл в виде Excel-файла
CLOSE ALL
USE Out_transp EXCLUSIVE NEW
SELECT Out_transp
aFields := {}
aColumnNames := {}
FOR j=1 TO FCOUNT()
AADD(aFields, FIELDNAME(j))
AADD(aColumnNames, A_RecName[j])
NEXT
*DC_WorkArea2Excel( cExcelFile, nOrientation, lDisplayAlerts, ;
* lVisible, aFields, lAutoFit, cDateFormat, aFieldEvals, ;
* cPassword, aColumnNames )
cExcelFile = M_ApplsPath+"\Inp_data\Out_transp.xls"
DC_WorkArea2Excel( cExcelFile,,,,,,,,, aColumnNames )
Code: Select all
1349. Added 3 new parameters to DC_WorkArea2Excel(). <lFreezeRow1>
(default TRUE) causes the first row of the Excel sheet to be bold font
and locked from scrolling. <lCSVFallBack> (default FALSE) causes a CSV
file to be created in the event that the Excel ActiveX control cannot
be loaded. <aColumnNames> is a 1-dimensional array with the names of
the columns. Default is the field name.
Code: Select all
#INCLUDE "dcdialog.CH"
#Pragma Library("dclip1.lib")
FUNCTION Main()
LOCAL j, aFields[0], aColumnNames[0], cExcelFile
DC_LoadRdds()
USE \exp19\data\xtest INDEX \exp19\data\xtest.cdx VIA 'FOXCDX'
DC_SetScope(0,'100')
DC_SetScope(1,'100')
FOR j := 1 TO FCount()
AADD(aFields, FieldName(j))
AADD(aColumnNames, DC_CapFirst(Lower(FieldName(j))))
NEXT
// DC_WorkArea2Excel( cExcelFile, nOrientation, lDisplayAlerts, ;
// lVisible, aFields, lAutoFit, cDateFormat, aFieldEvals, ;
// cPassword, lFreezeRow1, lCSVFallBack, aColumnNames )
cExcelFile = 'c:\test\lutsenko\xtest.xls'
DC_DbGoTop()
DC_WorkArea2Excel( cExcelFile,,,.f.,aFields,,,,,,, aColumnNames )
DC_SpawnUrl( cExcelFile )
RETURN nil
* -----------
PROC appsys ; RETURN