Topic Thread

Expand all | Collapse all

How to Write Collection to Excel

  • 1.  How to Write Collection to Excel

    Posted 01-29-2018 18:16
    Hello,   I am using the provide VBO object of MS Excel, Create Excel. However while writing the collection to the excel it is giving some errors. Can you please help with some example.   Thanks.

  • 2.  Hello. Would you care to…

    Posted 01-29-2018 18:18
    Hello. Would you care to share the errors you are getting?

  • 3.  Workbook Not Found :…

    Posted 01-29-2018 18:23
    Workbook Not Found : Workbook named: C:\Folder\Test.xlsx not found in instance: 0 The excel exist still this error is recieved.

  • 4.  AFAIK the Workbook name…

    Posted 01-29-2018 18:39
    AFAIK the Workbook name would be Test.xlsx in this case. 

  • 5.  But in that case where will…

    Posted 01-29-2018 18:58
    But in that case where will the excel be saved

  • 6.  When the details from…

    Posted 01-29-2018 19:04
    When the details from attached screen are given - following error is recieved . Internal : Could not execute code stage because exception thrown by code stage: The given key was not present in the dictionary.

  • 7.  I strongly recommend…

    Posted 01-29-2018 21:13
    I strongly recommend visiting the Process Examples (available in the templates area of the portal) and also re-visiting the Foundation Training course for examples of how to interact with Excel.  Based on your error you simply need to experiment a bit with how you are creating the instance of excel and creating or opening your Excel workbook.

  • 8.  RE: I strongly recommend…

    Posted 05-26-2020 16:41
    I realize you posted it some time ago, but allow me to offer my hanks for this advice, Denis.
    I just used it, and It is much appreciated.

    Gregory Winkeleer

  • 9.  To work with excel you…

    Posted 01-30-2018 15:44
    To work with excel you should use Excel VBO and don't have to launch by defining application moduller. Below actions from MS Excel VBO should work. create instance Open workbook Show

  • 10.  Hi -…

    Posted 01-30-2018 16:39
    Hi -   When you are creating an instance in the first place, it will not get saved.. It just hangs in there at the run time and hence supplying workbook name as test.xlsx will be sufficient. Just use the internal VBO and then create it. As Vinay suggested first.. first create an excel instance(handle number will be output) and then create the workbook(handle number from the first step will be input and workbookname will be output). Show action is not really mandatory. However just to understand the data is getting copied into the excel or any other operations with excel, show action is recommended. Use Create worksheet action (Workbook name will be input and worksheet name will be output). Then write collection to excel action will be used to write the collection data into the excel. Fields in collection should match with the columns in the excel. After writing data into the excel, please save the Workbook using save workbook as action, in this action you need to provide the complete path of the excel location.

  • 11.  Thanks Chaitanya, yes i…

    Posted 01-30-2018 20:27
    Thanks Chaitanya, yes i implemented in similar fashion successfully. Just one final important point is to Close Instance after work is done. This object is available in the VBO. Provide the same handle instance data item from step one as a input and Save as True.