Dear all,
Previously I use the vfp table as the data source of the excel pivot table.
oExcel = CREATEOBJECT("excel.application")
oWorkBook = oExcel.workBooks.add()
oTargetSheet = oWorkBook.sheets.add()
oTargetRange = oTargetSheet.range(mRange)
oPivotCache = oWorkBook.pivotCaches.add(2) && External data
oPivotCache.connection = "OLEDB;Provider=vfpOleDb.1;data source = c:\erp"
oPivotCache.commandText = "SELECT * FROM tRepData"
oPivotTable = oPivotCache.createPivotTable(oTargetRange,"pivotTable")
oPivotTable.PivotFields("csName").orientation = 1&& row
oPivotTable.PivotFields("cusName").orientation = 1 && row
oPivotTable.PivotFields("days").orientation = 2 && column
oPivotTable.PivotFields("cntDays").orientation = 4 && data
but nowadays most of the users install 64bits of MsOffice causing compatibility issues with VFP 32bits.
Thinking to export vfp data to xml and make it as the data source of the excel pivot table. Any idea how to do it?
Thanks and regards,
Previously I use the vfp table as the data source of the excel pivot table.
oExcel = CREATEOBJECT("excel.application")
oWorkBook = oExcel.workBooks.add()
oTargetSheet = oWorkBook.sheets.add()
oTargetRange = oTargetSheet.range(mRange)
oPivotCache = oWorkBook.pivotCaches.add(2) && External data
oPivotCache.connection = "OLEDB;Provider=vfpOleDb.1;data source = c:\erp"
oPivotCache.commandText = "SELECT * FROM tRepData"
oPivotTable = oPivotCache.createPivotTable(oTargetRange,"pivotTable")
oPivotTable.PivotFields("csName").orientation = 1&& row
oPivotTable.PivotFields("cusName").orientation = 1 && row
oPivotTable.PivotFields("days").orientation = 2 && column
oPivotTable.PivotFields("cntDays").orientation = 4 && data
but nowadays most of the users install 64bits of MsOffice causing compatibility issues with VFP 32bits.
Thinking to export vfp data to xml and make it as the data source of the excel pivot table. Any idea how to do it?
Thanks and regards,