Excel not reading content

Hello friends,
@rkelchuri, @Ninett_Panfir, @Rammohan91, @balupad14, @Florent_Salendres, @vvaidya, @Palaniyappan
I have a problem in reading Excel file.


It seems not reading anything.
I used message box to export what is read but it’s emtpt.
Any idea?
Thank you,
It’s urgent.
Cami :slight_smile:

Hi @CamiCat

Can you share the excel file? Also i am sure you must have verified the content in that particular sheet.

Thanks,
Prankur

1 Like

Hello @PrankurJoshi,

this is the file.
Can you please help me?
Thank you,
Cami :slight_smile:Elenco_fornitori_15-07-2019.xlsx (10.1 KB)

Hey @CamiCat

It is working for me

image

1 Like

How?
can you share the xaml?
Thank you :slight_smile:

1 Like

Hi @CamiCat,

It is working for me as well. Can you share your xamls so we can kinda find out what is going wrong?

Cheers,
Abdullah

1 Like

Here it is

Main.xaml (6.9 KB)

Hope this will work at your end as well

Thanks,
Prankur

1 Like

Fine
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
Cheers @CamiCat

1 Like

Hello @abdullahnj,

this is my xaml
Read File excel Input.xaml (21.4 KB)

Thenk you so much @Palaniyappan,
can you have a look at my xaml?
Read File excel Input.xaml (21.4 KB)
Thank you,
Cami

1 Like

get this error

1 Like

You have not passed Output variable in read range and you are using one in Output DataTable activity

image

This should be the datatable variable, also I don’t understand the reason you have used Assign activity in Excel Application Scope

image

Thanks,
Prankur

3 Likes

How should I do to extract the name of the sheet and then read the data table correct?
Thank you,
Can you okease share the xaml?
Thank you,
Cami :slight_smile:

See these threads to extract sheet names

Thanks,
Prankur

2 Likes

Thank you @PrankurJoshi.


In this way I get the error in the read range :frowning:

Can you please help me?

I have updated the workflow, see this

Main.xaml (8.6 KB)

This is for reading each sheet available

Thanks,
Prankur

3 Likes

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
Cheers @CamiCat

1 Like

Thank you,

no errors


but anything in the message box.
No mesasge box apperars :frowning:

1 Like

Fine
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
Cheers @CamiCat

1 Like