hexagon logo

PCL commands to import CSV data

Please suggest a methods to create a flie dialog to import the csv and read the contents. I would like to add the button to import in my widget. Please suggest.
  • Hi,
    Your question has multiple possible questions in it and so I'll start with the first:
    To create the file dialog: I've attached an example to illustrate the file widget. On your form you would have a button that calls a function like this one to display a file selector form. Your main form apply could use the "pass_back_file_name" function of this class to get the file name that was selected. Then you can open that and start processing its content.
     
    There are of course various ways that this might be written and this is just what I had at hand to illustrate using the file widget.
    The PCL needs preprocessing and compiling but I think you are familiar with doing that.
     
    best regards
    Arthur
     
    Note: apologies to whoever wrote the original code I re-purposed for this example.

    Attached Files (1)