Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

validating the first two columns of a excel file when importing?

Former Member
0 Kudos

Hi everyone,

I have an excel file in the presentation server which has to be uploaded into prog.First the user adds a additonal column in the excel file.

For example the excel file is intially in this way,

col1 col2 col3 col4 col5

Now the user adds one more column 'colx' in the excel sheet and he will upload it into the prog.Before uploading programatically we have to validate that the first two columns of the excel file should be col1 colx(the newly added one).How can I do it?

Any suggestions please?

Thank you.

2 REPLIES 2

gopi_narendra
Active Contributor
0 Kudos

It cant be done before importing into a internal table.

The validations can only be done after uploading the data into a internal table.

After uploading the data, do the necessary validations and delete the error records from the internal table

Regards

Gopi

0 Kudos

Hi gopi,

Thanks for the reply.

I have one more problem.Now in the excel file I may have only 5 columns in the future it may have more than that.So the internal table which will hold the uploaded values from excel file should be dynamic.I can't declare the internal table with 5 or 6 columns like that.If the user adds some columns in the excel file and upload it,the internal table should hold these columns also.

i hope u understood my requirement.Can u give me any ideas.If u have any sample code for this kind of requirement.

Thank you.