Aller au contenu principal

Convert XLSX To Data Set Activity

Commentaires

5 commentaires

  • Ken Lyon

    Hi Amir Afzalinezhad,

    That'd be a question for the VertiGIS Studio Web or VertiGIS Studio Mobile community, depending which product you are using.

    Not all Workflow Activities have an equivalent command, though.

    0
  • Amir Afzalinezhad

    Hi Ken Lyon

    Right now I have a problem on reading a file .Xlsx format and convert it to a data set. I read the file using results.from-xlsx command and it works. However when I give an empty file to it I receive and error. I want to convert it to a data set, So, I can put an if statement that when the first index is empty it show a message to the user. Do you have any idea? 

    0
  • Ken Lyon

    When you say “empty file” do you mean a file that is literally zero bytes long, or do you mean an excel file that contains no data?

    You could use the Read File Bytes activity in a workflow to get the data from the .xlsx file and then use an If activity with a condition like this:

    =$readFileBytes1.bytes.length > 0

    to confirm the file is not empty before then using the Convert XLSX to Data Set activity to convert the data.

    If you're referring to an Excel file that contains no data, it'd be harder to handle. Where is the file coming from? Do you have any control over it? If you have control over the creation of the file, you should always include field names. I expect that could be a problem if it's absent.

    You could use a Try Catch activity to handle situations where the conversion fails.

    0
  • Amir Afzalinezhad

    Ken Lyon 

    I am referring to an Excel file that contains no data. Sometimes happen that user upload an empty file. So I want to handle this issue. This will cause an error, since results.from-xlsx command cannot read an empty file. Try to Catch is good idea I will check it. Thank you for your help. 

    However in general we dont have Xlsx to data set command like Geocortex, yes? Because I was also looking how I can read the data from the Xlsx file like a data table

    0
  • Ken Lyon

    Amir Afzalinezhad I should have mentioned that the activity is only available in Server Workflows (on-premises) and in VertiGIS Studio Desktop for ArcGIS Pro.

    You could also contact our support team about whether or not this behaviour of the results.from-xlsx command is a bug. Maybe it should handle the situation better when the file is empty. I don't know enough about how it was designed to comment on that, though.

    0

Vous devez vous connecter pour laisser un commentaire.