12-28-2009 10:50 AM
hello,
I have an excel file on the application server which I have to read and process. I can do this with open dataset but my problem is the excel file has header data (names of the fields) in each column. Is there any way to skip the header row from the excel file when reading from the application server.
Thanks for your help
12-28-2009 11:09 AM
Hi,
Header line will be there at once only , so read from the second record i.e consider that header line is one record.
Read the file and if no record found exit the loop.
READ DATASET physical file INTO temp table.
Always the first record of the application server file is Header line.
So header line is skiping
IF sy-index = 1.
CONTINUE.
ENDIF.
Regards,
Bharani
12-28-2009 3:59 PM
Hi Dishant,
Do not consider the first line in your internal table when you read it from file.
or you can delete it by using index = 1.
Hope this helps you.
12-28-2009 4:04 PM
Why cant you read the whole and skip the first line while processing ?
check this link
11-30-2010 4:03 PM
02-09-2011 1:38 PM
Hi Dinesh
How u read .XLS file from Application Server, Can u send me Code Sample