Welcome to Golden Software Support

Adding a textbox from individual cell in excel file


1 comment

  • Avatar
    Kari Dickenson


    There isn't a way to insert the contents of a specific cell in the worksheet into the Text Editor. I have added your vote to this request on our suggestion file. However, you can open the data file in the Surfer worksheet and simply copy the contents from the cell in the worksheet and paste it into the plot window:

    Sub Main 

    Dim SurferApp As Object
    Set SurferApp = GetObject(, "Surfer.Application")
    SurferApp.Visible = True

    Dim Plot As Object
    Set Plot = SurferApp.Documents.Add(srfDocPlot)

    'Open the data file in the worksheet
    Set Wks = SurferApp.Documents.Open(SurferApp.Path+"\samples\ColoradoCities.xls")

    'Set copy cell C5 in the worksheet

    'Paste cell contents into plot window


    End Sub

    This will remain static and won't update though if the cell contents change. This works just fine to get the cell contents in the plot window; however, I do notice that in Surfer 13, the text is pasted with quotes around it. I am not sure why this is the case, and I have forwarded this issue to our programming team for further investigation.



    Comment actions Permalink

Please sign in to leave a comment.