Import Excel *.xlsx to Internal Table - with ABAP [english]

preview_player
Показать описание
In this video I show how to import data from an Excel file (*.xslx) into an internal table.
For this I use the class: cl_fdt_xl_spreadsheet

For the import the following steps are performed
1: Upload of the Excel file
2: Transform the data SOLIX to XSTRING
3: Create an object reference to the file
4: Read the worksheets
5: Create an object reference to the first worksheet
6: Display the data

#Excel #Import #ABAP

▬▬ Literature 📚 ▬▬▬▬▬▬▬▬▬▬▬▬▬

▬▬ My Hardware 💻 ▬▬▬▬▬▬▬▬▬▬▬▬▬

▬▬ My Software (free) 💾 ▬▬▬▬▬▬▬▬▬▬▬

▬▬ Further Links 🔗 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

*The links are affiliate links. There are no additional costs.
Рекомендации по теме
Комментарии
Автор

Excellent work! Thanks a lot, it is working at background as well.

onursara
Автор

Excellent. Nicely explained. Although I am able to copy your code and import data from excel into internal table, I am not able to understand your coding. Expressions like =>, ->, NEW, ->* etc. I am unable to comprehend. Please tell me where I can learn all these steps in detail? Thank you

muhammadfahim
Автор

Thanks for the excellent video. I am having a requirement to wrap an alv field content when it is more than 128 length. Could you please suggest me a way to display the field (wrap the data when the length is more than 128) in alv report?

sk
Автор

Hi, can you make a video where you show how to upload excel data to use it in a transaction like MIRO or posting acconting documents.

DavidButanda-ve
Автор

Excellent code I helped me so much. Thanks.

christianarmandorivasroble
Автор

Great video, thanks for the upload.
I have a couple of questions!!
Q: What to do if we want to limit the input of the .xlsx file?
-> Let's say the file has 30K line items and I want to process 20K first then the remaining once i.e. 10K.
-> How to split? and then how to process the remaining line items?
[I know manually we can split the files and then process but I want to automate this process]

MeerutUnited
Автор

Great work, very clean code, please keep it up also, please improve sound quality and increase font size

NeerajKumar-durm
Автор

Hi great video but I dont understand why are you always try-catch generic cx_root? Is this some kind of best practice? Do you know where can I find some more info what and where shoud I catch?

Artur-fjpn
Автор

Generally works but as checked if i make partial text of row bold then it is picked as blank and also with special characters file stream breaks

adityasharma-lfzt
Автор

I am processing the internal table <worksheet> using loop statement as shown below -
LOOP AT <worksheet> ASSIGNING FIELD-SYMBOL(<ls_line>). <ls_line>-A = lwa_mgo-consumer.
But this statement giving me error showing "The data object "<ls_line>" does not have a structure and therefore does not have a component "A".
I want to copy this <worksheet> internal table to user define internal table. Can you please help me with this.

rakeshpatil
Автор

I have a little question ; what should I do if I wanted to pass the data into a internal table to manipulate?

benur
Автор

Can you Do a video on a File from Application Server (.xlsx) to internal table.

vikasramamohan
Автор

I have a little question, How would I go about changing the column names?

davialves
Автор

Please reply the code lines to populate the data into internal table.

sslr
Автор

Hi Mr please I have a lot of worries about this tutorial, is there a methodology to better manage this import step by step?

ruisselmeutang
Автор

Thanks a lot for this, it is very helpful ! But I have a question for you. Let's say that I have an excel that I would like to convert into a txt file with a specific column delimitation (which have some differences from my excel) How can I achieve that ? My Idea was to loop the field symbol, not sure how, or try to move the content of the excel in an internal table and from there loop in a work area to put the fields as I need it, but then, how can I convert that in a TXT file that the user can download ? VIELEN VIELEN DANK !!!!

leocarnicella
Автор

hey i have one little Q, at the output A, B, C, D showing on upper side(header), how to remove this

vinayakpawar
Автор

I get FILE_OPEN_ERROR dump when trying to upload a file, error occurs at gui_upload, what could be wrong? the file i am trying to upload is an .xslx file.

hipfireN
Автор

Can I use this using csv format? I need to solve issue with csv file having a huge data. I'm thinking to convert csv to xstring to internal table.

kuraizuke
Автор

cl_fdt_xl_spreadsheet class produces an error for me. Any alternatives?

nisargmehta