Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this macro for export an Excel.
sub ExportExcel()
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = true
Set xlDoc = xlApp.Workbooks.Add()
'Create the new sheet and the content in the sheet
Set xlSheet = xlDoc.Worksheets.Add
xlSheet.Name = "SheetFromExcel"
Set SheetObj = ActiveDocument.GetSheetObject("CH29")
SheetObj.CopyTableToClipboard true
xlSheet.Paste
set xlApp = ActiveDocument.GetSheetObject("CH29")
xlApp.ExportEx "C:\Proyecto QlikView\Reporte.xls" ,4
ActiveDocument.ClearAll
The problem is that sometimes that exports ok, but sometimes trigger an error. That says something like "Macro parse failed. Functionality was lost. ExportExcel. Error with the Paste method from Worsheet class".
For example, if I change the qvw name, doesn't work or if I set the pivot table seems visible, neither.
How can I solution this issue?
Thanks.
sub a
'ActiveDocument.clearall
''path="D:\Ananth\WORKING\Migration_Testing\Generated_Files\Production_PDF\GWP_Detailed_FTD_Report"&".XLS"
''set lb = ActiveDocument.GetSheetObject("CH396")
''lb.ExportBiff path
end sub
please try this one
Mmm, that doesn't work, I mean works but sometimes, like before.
Do you know another solution?
Thanks.
Hi,
I'm having the same problem, sometimes it runs fine and sometimes (most of the time) it runs in a error.
"Macro parse failed. Functionality was lost. ExportExcel. Error with the Paste method from Worsheet class"
Did you found a sollution for this problem?
Thanks in advance.