cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and Drop - SAPUI5

shama_parween
Explorer
0 Kudos

Hello Experts,

I want to create a DIV where external excel files can be dragged and dropped.

Can you please help me with the code.

Regards,

Shama

Accepted Solutions (1)

Accepted Solutions (1)

imsuryapandiyan
Participant

Shama,

You don't have to create div.

Try Upload Collection with file type of excel.

Answers (1)

Answers (1)

shama_parween
Explorer
0 Kudos

Hello Suriya,

Thank you!

It serves the exact purpose. Can you also let me know how to restrict multiple file upload? I have used multiple="false", still it allows multiple file upload.

Regards,
Shama

imsuryapandiyan
Participant
0 Kudos

Hi Shama,

multiple="false"

This property allows you select only one file when you upload. Still it allows to upload multiple times.

If you want to handle even that, you have do it in onChange event handler.

onChange: function(oEvent){
			if(oEvent.getSource().getItems().length){
				sap.m.MessageBox.error("Only one item allowed!");
				throw "Only one item allowed!";
			}
			else{
				//on change upload code
			}
		}