Fill data in multiple columns and multiple rows of java applet or web page

I have a requirement where i have a applet form which having 10 rows and 6 column and i need to get data from excel and fill data row by row if excel data is more than 10 rows it will open another form and if data is less than 10 coulmn it will fill those data and save the form below is my form