1 Reply Latest reply: Mar 4, 2010 11:54 AM by Miguel Angel Baeyens de Arce RSS

    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 .....