Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export to Excel objects through a macro

Dear, I do not understand a problem and I can not solve. When you run a macro that creates an excel workbook I have the sgte. code:

ActiveDocument.Sheets ( "Stock"). Activate

appExcel.Worksheets.Add.name = "Stock"

ActiveDocument.GetSheetObject ( "CH06"). CopyTableToClipboard true
appExcel.ActiveSheet.Paste

In the execution sgte throws me the error: 'Error in Paste method of Worksheet Class'

The funny thing is that this occurs in the execution on the Server, to test the macro on my pc gives me the error. The object under dynamic gluing is a table of at most 16 rows and 10 columns ....

To eliminate the error comment leave that part of the macro, but now gives me error in another line:

appExcel.Columns ( "A: A"). Select

the message that tells me is: Unknown runtime error, 'appExcel.Columns (..). Select'


The other curious fact is that, while the model on the server, sometimes it works without problems.


Well, I hope someone can help me and sorry for writing but do not speak English .....

1 Reply
Miguel_Angel_Baeyens

Hola,

Antes de entrar en el código, ¿podría ser que el error te aparezca estando el documento excel en uso y no preparado para uso compartido? Eso explicaría por qué no te deja copiar y por qué funciona a veces...

Un saludo.