It seems not reading anything.
I used message box to export what is read but it’s emtpt.
Can you share the excel file? Also i am sure you must have verified the content in that particular sheet.
this is the file.
Can you please help me?
Cami Elenco_fornitori_15-07-2019.xlsx (10.1 KB)
It is working for me
can you share the xaml?
It is working for me as well. Can you share your xamls so we can kinda find out what is going wrong?
Here it is
Main.xaml (6.9 KB)
Hope this will work at your end as well
Kindly check these in the workflow
—the variable of the read range should be of type datatable
— that datatable variable should be with scope of whole sequence when it is defined in the variable panel or if not go to variable panel down in the studio and change the scope to whole sequence
—then make sure that variable is only passed to the output datatable activity as it takes only datatable as input
—then the output of the output datatable should be of type string and name it differently (as I see like the name of both datatable variable from output datatable and the one we mention for output datatable output variable looks same)
— then pass that string variable as input to the message box
— finally make sure that the excel has some value in it if not we will be getting this error
And to handle this error we can use a if condition before the output datatable like this
Like if the output variable of read range is named as outdt then the if condition next to this excel application scope would be like this
outdt.Rows.count > 0
Which means the datatable has rows in it and if the above condition passes it will go to THEN part where we can have the output datatable activity or it will go to ELSE part where we can leave it empty
—next to this if condition we can have the remaining activities as we have now
Simple isn’t it
You have not passed Output variable in read range and you are using one in Output DataTable activity
This should be the datatable variable, also I don’t understand the reason you have used Assign activity in Excel Application Scope
How should I do to extract the name of the sheet and then read the data table correct?
Can you okease share the xaml?
See these threads to extract sheet names
Thank you @PrankurJoshi.
In this way I get the error in the read range
Can you please help me?
I have updated the workflow, see this
Main.xaml (8.6 KB)
This is for reading each sheet available
i have issue with my system and so i m not able to see the xaml if possible can i have a view on your xaml in a sequence of screenshots
lets do one thing
before read range activity use a write line and mention as item.ToString
lets check whether we are getting any sheet names or not
–And if we get the sheet name we need to check whether the excel has value or not and check with the output variable obtained from the read range is sent to output datatable activity and that variable has a scope of whole sequnce (check inthe variable panel)
–get the output from the output datatable activity with a variable of type string and pass that as input to message box
This should work for sure