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

    <FONT size=3><FONT face=Calibri>Hi All, </FONT></FONT>


    <FONT size=3><FONT face=Calibri></FONT></FONT> 


    <FONT size=3><FONT face=Calibri>We are trying to automate a .NET application using Farpoint Spreadsheet controls using QTP 11.<o:p></o:p></FONT></FONT>


    <FONT size=3><FONT face=Calibri>Using the native object we are able to recognize and manipulate data in cells if the Spreadsheet control has a simple layout.<o:p></o:p></FONT></FONT>


    <I><FONT size=3><FONT face=Calibri>e.g., SwfWindow.<SPAN style="BACKGROUND:yellow;mso-highlight:yellow;">SwfObject(“fpSpread1”).Object</SPAN>.ActiveSheet.ActiveCell.Value<o:p></o:p></FONT></FONT></I>


    <o:p><FONT size=3 face=Calibri> </FONT></o:p>


    <FONT size=3><FONT face=Calibri>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.<o:p></o:p></FONT></FONT>


    <o:p><FONT size=3 face=Calibri> </FONT></o:p>


    <SPAN style="mso-fareast-font-family:Calibri;"><SPAN style="mso-list:Ignore;"><FONT size=3 face=Calibri>1.</FONT><SPAN style="FONT:7pt 'Times New Roman';">       </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Spreadsheet object having a “ComboBox” as one of the cells. We need information on how to select the combo box value.<o:p></o:p></FONT></FONT>


    <SPAN style="mso-fareast-font-family:Calibri;"><SPAN style="mso-list:Ignore;"><FONT size=3 face=Calibri>2.</FONT><SPAN style="FONT:7pt 'Times New Roman';">       </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>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.</FONT></FONT>


    <o:p><FONT size=3 face=Calibri></FONT></o:p> 


    <FONT size=3><FONT face=Calibri>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.<o:p></o:p></FONT></FONT>


    <FONT size=3><FONT face=Calibri>Your help is very much appreciated.<o:p></o:p></FONT></FONT>


    <o:p><FONT size=3 face=Calibri> </FONT></o:p>


    <o:p><FONT size=3 face=Calibri>The objects/classes needed to access grouped cell values also would help finding a solution.</FONT></o:p>


    <o:p><FONT size=3 face=Calibri></FONT></o:p> 


    <FONT size=3><FONT face=Calibri>Please let us know of similar issues you might have experienced with Farpoint Spread controls and the solutions devised to handle them.<o:p></o:p></FONT></FONT>


    <o:p><FONT size=3 face=Calibri> </FONT></o:p>


    <FONT size=3><FONT face=Calibri>Thanks in Advance!<o:p></o:p></FONT></FONT>

  • Replied 8 September 2017, 3:01 pm EST

    Hello,

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

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



    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