Farpoint Spreadsheet Recognition with QTP 11

Posted by: ards-z on 8 September 2017, 3:01 pm EST

  • Posted 8 September 2017, 3:01 pm EST

    Hi All, 


     


    We are trying to automate a .NET application using Farpoint Spreadsheet controls using QTP 11.


    Using the native object we are able to recognize and manipulate data in cells if the Spreadsheet control has a simple layout.


    e.g., SwfWindow.SwfObject(“fpSpread1”).Object.ActiveSheet.ActiveCell.Value


     


    But when faced with spreadsheets having the following structures we are trying to find ways/workarounds to automate them since the direct methods do not work with them.


     


    1.       Spreadsheet object having a “ComboBox” as one of the cells. We need information on how to select the combo box value.


    2.       Spreadsheet object having expandable/collapsible groups of cells having separate headers for the grouped cells (similar to a spreadsheet embedded inside the master sheet). We need information on how to access the cells and controls in the expandable group of cells.


     


    Solutions that we tried include GetChildSheets and SheetView classes. We could have missed out something since this is the first time we are facing this control.


    Your help is very much appreciated.


     


    The objects/classes needed to access grouped cell values also would help finding a solution.


     


    Please let us know of similar issues you might have experienced with Farpoint Spread controls and the solutions devised to handle them.


     


    Thanks in Advance!

  • Replied 8 September 2017, 3:01 pm EST

    Hello,

    Please have a look at the following response from the concerned team:

    1. ComboBoxCellType.EditorValue determines how the cell value is
    handled.  They can use Items to get the items in the list, then if
    EditorValue is String, set the string value for the item they want to
    select to the cell value.  If EditorValue is index, they can set the
    index of that item in the list to the cell value, and if it is ItemData,
    the can set that.


    2. Hierarchical spreadsheets are hard to deal with in code, but it can be done.  They need to use FpSpread.GetRootWorkbook().GetChildWorkbooks()
    and SheetView.GetChildSheets() to get the objects in the hierarchy,
    then use methods on the SpreadView and/or SheetView to get or set values
    in the child.  It sounds like they have found the latter method but
    missed the first.



    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur

     

  • Replied 8 September 2017, 3:01 pm EST

    Thanks a lot Manpreet :D. It works and we have implemented this solution successfully.
  • Replied 8 September 2017, 3:01 pm EST

    Hello,

    I have forwarded your request to the concerned team. I would let you know as soon as I get any information in this regard.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 3:01 pm EST

    Thank you Manpreet!
  • Replied 8 September 2017, 3:01 pm EST

    Hello,

    I'm also facing this same problem. Can you please share some sample code on how you implemented it?

    Thanks in advance.
  • Replied 8 September 2017, 3:01 pm EST

    Hi,

    Are you using Spread Windows Forms version 10?
    These help topics can help:
    Setting a Combo-Box Cell
    Working with Hierarchical Data Display

    Regards,
    -Sean

  • Replied 8 September 2017, 3:01 pm EST

    Hi Sean,

    I'm trying to automate .net application with spreadsheet controls.

    Thanks,
    Karthik S S
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels