I'm confronted with a problem as below and hoping some body could give some advice.
I need to convert a lot of excel tables in different shapes into constructed data, the excel tables are as below.
|--------------------|----|----|
|user:Sam | | |
|--------------------|----|----|
|mail:sam@example.com| | |
|-------|----------------|-----|
|user |Jack | |
|-------|----------------|-----|
|mail |jack@example.com| |
|-------|----------------|-----|
|-------|-----|---------------|---------|
|user |May | | |
|-------|-----|---------------|---------|
| |mail |may@example.com| |
|-------|-----|---------------|---------|
|user | Alex |mail |alex@example.com|
The target result would be like the following format.
|-------|-------------------|
|user | email |
|-------|-------------------|
|Jack | jack@example.com |
|-------|-------------------|
|Sam | sam@example.com |
|-------|-------------------|
|Alex | alex@example.com |
|-------|-------------------|
|May | may@example.com |
|-------|-------------------|
My current solution is to define a function for each type of excel table. But there would be thousands of different excel files so I would have to repeat write similar code. So my question is whether there is common solution for it.
I found one similar question about this but there is no more information.I think machine learning may help to solve the problem, but I know little about that. Is there any one who could share some thoughts? Thanks very much!