Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

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

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

Export to Excel objects through a macro


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.

Community Browser