* a simple way to extract excel data with complex format
Key words:parse excel of free format structured excel
To solve this kind of problem by programming, the workload will be very large. And because of the irregular format of many Excel files, the programs written can not be used universally. It is very troublesome to rewrite new programs every time to meet new requirements.
It would have been much simpler to deal with such problems if you had used esProc SPL. It has carefully designed a set of function library in the field of set operation, and it is more flexible and efficient to process Excel files; SPL is a script of interpreted execution, and it is easy to achieve hot switching to adapt to new requirements. For example, to deal with such a scenario, the format of the file employee.xlsx is as follows:
The structured effect is shown as follows:
esProc SPL can complete the task with a few simple lines. The code is as follows:
A |
B |
C |
|
1 |
=create(ID,Name,Sex,Position,Birthday,Phone,Address,PostCode) |
||
2 |
=file(“employe.xlsx”).xlsopen() |
||
3 |
[C,C,F,C,C,D,C,C] |
[1,2,2,3,4,5,7,8] |
|
4 |
for |
=A3.(~/B3(#)).(eval($[A2.xlscell(]/~/”)”)) |
|
5 |
if len(B4(1))==0 |
break |
|
6 |
>A1.record(B4) |
||
7 |
>B3=B3.(~+9) |
In fact, there are many similar structured problems, and it will be very simple to use esProc SPL. Please refer to Parsing and Exporting Excel Data in SPL.
esProc is also a professional tool for file data source processing. It can easily perform mixed calculation, importing into and exporting out of database of various file data, such as TXT, Excel, XML, JSON, CSV, ini, etc.
A desktop computing tool, esProc is ready to use, with simple configuration and complete debugging functions: breakpoints and single step execution can be set, and the result of each step can be viewed. The syntax is simple, in line with people's natural thinking, and simpler than other advanced development languages. Please refer to: http://www.raqsoft.com/html/file-processor.html
esProc is integration-friendly. Read How to Call an SPL Script in Java to see how we can easily embedded an SPL script into a Java program.
Read Getting Started with esProc to download and install esProc, get a license for free and find related documentation.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/