You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to make a program that could read data of a specific table via table name from Excel file. Now I am confused about how to identify that table from an Excel file. I looked through the abap2xlsx project, but I didn't find any method for identifying a specific table through the table name.
For example, in the below sheet I have 6 tables. But, I want to read or extract only the data of "PriceList" table, not the others. So, how can I do this?
I know that, we can get data of a table using "get_table". Now if I use "get_table", so how should I find values of these parameters dynamically "iv_skipped_rows", "iv_skipped_cols", "iv_max_col", and "iv_max_row".
If somebody could give me some advice, that would be great. Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hello. As I said in your original question at SAP forum:
"Do a GET_TABLE of all cells to fill an internal table, and then apply the logic you want on this internal table."
Although the rest of the logic you are looking for is not really part of abap2xlsx, I propose below an example of logic. Maybe you will need few methods of abap2xlsx to convert dates.
Create a kind of dynamic internal table with many string columns (e.g. 100)
Read all the cells of your worksheet into an internal table:
Read the line 2 of the internal table, lookup all columns of the internal table till you find your "table" (e.g. if you are looking for "PriceList", you will find it at the column number 9 (column letter "I").
Read the line 3 of the internal table, lookup all fields from the 9th field till you reach an empty field (e.g. you get the fields Brand, Model, Price). So, you know that the last field is at the column number 11 (column letter "K").
Read all the lines of the internal table, starting from the line 4, till you reach an empty line, and transfer the values to a target internal table having the same structure of PriceList table in your system.
Good luck!
If you have some questions related to abap2xlsx itself, don't hesitate to post another question.
Thank you.
I have to make a program that could read data of a specific table via table name from Excel file. Now I am confused about how to identify that table from an Excel file. I looked through the abap2xlsx project, but I didn't find any method for identifying a specific table through the table name.
For example, in the below sheet I have 6 tables. But, I want to read or extract only the data of "PriceList" table, not the others. So, how can I do this?
I know that, we can get data of a table using "get_table". Now if I use "get_table", so how should I find values of these parameters dynamically "iv_skipped_rows", "iv_skipped_cols", "iv_max_col", and "iv_max_row".
If somebody could give me some advice, that would be great. Thanks in advance.
The text was updated successfully, but these errors were encountered: