2009 Dec 28 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
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
2009 Dec 28 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
2009 Dec 28 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.
2009 Dec 28 4:04 PM
Why cant you read the whole and skip the first line while processing ?
check this link
2010 Nov 30 4:03 PM
2011 Feb 09 1:38 PM
Hi Dinesh
How u read .XLS file from Application Server, Can u send me Code Sample
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |