[Easy language] Flush time-sharing data export script stepping on the pit

This is a custom made by a netizen. I have never been in contact with a straight flush and I didn't want to do it, but I couldn't resist some kind of temptation, so I took it.

I made the first version with only 3 buttons, and then required various changes, and the version with the final picture was the end. It was really scalp numb.

b95764bd0b02fc27959c4298d519e226.png

Here is a record of the pits you stepped on:

  • grab bag

    Bad habit, I want to capture everything I see, I searched all kinds of information on the Internet, and sure enough, there is no free interface. I also searched for real-time data of the straight flush from various websites. Although there are some data, it is not what netizens want after all, so I was blind for a day.

  • memory read

    Because the packet capture cannot be caught, this can basically only simulate manual operation. Netizens proposed to use the memory to read, I thought about it like this 6, the colorful data is moving around, so I can't be blind when looking for the address. And as software related to money, it's better not to do this kind of thing, just chatting for a long time.

  • Excel program and workbook components

    The two components of easy language are somewhat difficult to use, but the reason why they have to be used in this script will be mentioned below.

    First of all, the data it reads will lack arms and legs. For example, if 0.08 is read, it will become .08; for example, -0.05 will become -.05. It is barely used under judgment. Otherwise, the table data on hand of netizens has 160,000 cells, and the CPU will be scrapped.

    f919cc3fce1fc958c778eaa1a4dbbb72.png

    Then, just use it to open the Excel table and modify it, it cannot be saved directly! ! ! It needs to be saved, and I vomited again. If you read and write well, you have to change hands again.

    The last is that its speed is really slow, difficult to use, and has few commands.

  • LibXL module

The module itself is very cool to use, and the opening and reading and writing speeds are very fast. In this script, I mainly use it to fill most cell areas with formulas. Quack the filling and it works well. Generally, at this time, there will be some moths, it does not have a formula calculation engine! ! !

What does this mean? You can fill a cell with a formula, but when you read the cell, it returns 0, which means it cannot give you the value calculated according to the formula!

I have been thinking about it for two or three days here, and I searched online. Many people have encountered this problem, but no one has a solution. Later, I forgot where I saw someone saying that it does not have a computing engine.

Its problem is that after filling the formula, manually open the Excel file and save it once, and then read it normally. In fact, the key is because the manual Excel file, whether it is office or wps, has calculated the formula once, so the subsequent reading is normal. It is also the reason why the cells I filled with LibXL can be read normally when directly filled with data, and the reason why only 0 can be read when filled with formulas.

Therefore, I had to use the Excel component that comes with Easy Language again. After LibXL filled the formula, I opened and saved it with the Excel component, and then read it with LibXL (because of the fast speed and many commands). This is the solution for the time being, and there is no good solution for the time being, and there is no time to find other modules. It is estimated that there are some problems.

The script of this kind of simulation operation is quite frustrating. Computer configuration, resolution, operating habits, etc. will affect the execution of the script. I have made so many configuration items for simple functions, mainly for the convenience of debugging. Install an easy language on the computer.

69c7f57a1181e1c5dd8294ab00f0cd1c.png

Put a running video:

In the end, this is also a case of what Yi Language can do, it can really make money.

- End -

More exciting articles

Click on the business card below to follow【Occasionally type code】

Light up the little flowers b62bb9b99fe4e9396948b5d6b2272589.gif to let more people know

Guess you like

Origin blog.csdn.net/a18065597272/article/details/130538290