Skip to main content
Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Copy to Excel transpose

Hello,

I want to export a QV object transposed to an excel worksheet with a macro: I wrote the following test macro where first I export with send to excel and after with a past function: the oprion TRANSPOSE:= TRUE is refused by QV. Can someone help me please?


set XLApp = CreateObject("Excel.Application")
XLApp.Visible = True
set obj = ActiveDocument.getSheetObject("CH06")

obj.sendToExcel

set XLDoc = XLApp.Workbooks.item(1)


ActiveDocument.GetSheetObject("CH06").CopyTableToClipboard true
XLApp.Worksheets(1).Range("A30").Select()
' XLApp.Worksheets(1).Paste()
XLApp.Worksheets(1).PasteSpecial

XLDoc.SaveAs "TEST.XLS"
'msgbox "pause"
XLApp.Quit

0 Replies