Rod Caldwell
2008-11-01 06:03:44 UTC
I've just updated to Office 2007 and now my Reports option to Excel does not work (a generic code copied from the knowledge base).
I've isolated the problem to the paste function. This could either be with the past function itself or the clipboard.cc not uploading data in the correct format (XP SP1). I have the lastest version of Clipborad.cc.
Is anyone else having this problem?
function EXCELBTN_onClick
local oExcel, i, nRow, f
_app.l = true // Excel
// Create instances of our variables so we can use
// the assignment (:=) operator from here on out.
store 0 to oExcel, i, nRow
cText = "" // initialize our string variable
if form.OUTSTANDING.value = true
Class::OUTSTANDINGwk(False) // load cText with the information required
else // form.ALLOUTSTANDING.value = true
Class::OUTSTANDINGwk(True)
endif
set procedure to clipbord.cc additive
_app.Clip = new TextClipboard() // create our clipboard object
_app.Clip.SetClipboardText( cText ) // place our string
// now we start Excel
oExcel := new oleAutoclient("excel.application")
// create a new workbook
oExcel.workbooks.add()
// since the field and record separators are embedded
// all we need to do is select the top left cell.
// of course you could stick column headings in here,
// but we won't bother in this example.
oExcel.ActiveSheet.cells( 1,1 ).select()
// now just call Excel's paste method
oExcel.ActiveSheet.paste() // FAILS AT THIS POINT
// and size the columns to fit
oExcel.ActiveSheet.Columns.AutoFit()
// now we select A1 to un-select the range
oExcel.ActiveSheet.Range("A1").Select()
// and proudly show the result
oExcel.visible = true
form.close()
return
I've isolated the problem to the paste function. This could either be with the past function itself or the clipboard.cc not uploading data in the correct format (XP SP1). I have the lastest version of Clipborad.cc.
Is anyone else having this problem?
function EXCELBTN_onClick
local oExcel, i, nRow, f
_app.l = true // Excel
// Create instances of our variables so we can use
// the assignment (:=) operator from here on out.
store 0 to oExcel, i, nRow
cText = "" // initialize our string variable
if form.OUTSTANDING.value = true
Class::OUTSTANDINGwk(False) // load cText with the information required
else // form.ALLOUTSTANDING.value = true
Class::OUTSTANDINGwk(True)
endif
set procedure to clipbord.cc additive
_app.Clip = new TextClipboard() // create our clipboard object
_app.Clip.SetClipboardText( cText ) // place our string
// now we start Excel
oExcel := new oleAutoclient("excel.application")
// create a new workbook
oExcel.workbooks.add()
// since the field and record separators are embedded
// all we need to do is select the top left cell.
// of course you could stick column headings in here,
// but we won't bother in this example.
oExcel.ActiveSheet.cells( 1,1 ).select()
// now just call Excel's paste method
oExcel.ActiveSheet.paste() // FAILS AT THIS POINT
// and size the columns to fit
oExcel.ActiveSheet.Columns.AutoFit()
// now we select A1 to un-select the range
oExcel.ActiveSheet.Range("A1").Select()
// and proudly show the result
oExcel.visible = true
form.close()
return