How to write a program that draws names from excel in easy language

Updated on technology 2024-02-29
20 answers
  1. Anonymous users2024-02-06

    Version 2 supports the library edb

    Support for library specs

    Subroutine button 1 is clicked.

    Local variable a, integer type.

    Set the random number seed ().

    a takes the random number (1, the record set. Number of records) debug output (a).

    Box 1Content Name text [a].

    The subroutine Startup Window is created.

    Local variables concatenate text, textual.

    Local variables: file address, textual.

    Local variables, sql statements, textual.

    Local variables: number of cycles, integer.

    File address Take the name of the running directory (). xls”

    If (database connection. Connect ("driver=; driverid=790;dbq=" file address defaultdir=" file address true).

    Output debug text ("Link successful!"). ”)

    If true (recordset. Set the connection (database connection) false) returns (if true).

    SQL statement select * from [sheet1$]".

    Recordset. Open (sql statement, sql statement) number of loops recordset. Number of records.

    Redefine arrays (text variables, false, recordset. Number of records) counts the number of cycles (number of cycles, ).

    Recordset. Read text (0, text variable [1]) to join the member (name text, text variable [1]) recordset. Go to the next ().

    Counting cycle tail ().

    Output debug text ("Read in and show success!"). ”)

    Otherwise. Output debug text (database connection.) Last error) if it ends.

  2. Anonymous users2024-02-05

    Upstairs, you can do it for him, you don't need to pretend to be forced here.

  3. Anonymous users2024-02-04

    It's simple for me.

  4. Anonymous users2024-02-03

    Hello, it's very simple, make one right away.

    Version 2 supports the library iext

    Subroutine button 1 is clicked.

    Clear Label 1Title Multiple Choice (take random numbers (1, 6), Passerby A, Cannon Fodder B, Rogue C, Bandit Ding, Audience A, Audience B).

    I don't know what to ask.

  5. Anonymous users2024-02-02

    I was going to see if it worked, but I wrote it out for you, and read the source code for yourself.

    Remember to adopt.

  6. Anonymous users2024-02-01

    You're saying a txt with the names of hundreds of people.

    And then that's what it means to smoke one of these hundreds of people.

  7. Anonymous users2024-01-31

    Use the com object to call excel.

    To learn as a novice, use the com object to call excel

  8. Anonymous users2024-01-30

    This is easy to implement, but there is a suggestion, it is best not to save directly from the easy language to excel, because the easy language is not easy to use for excel automatic save implementation, save, modify, delete will pop up the prompt box, even if it is written to the program during the running process does not pop up the prompt box, the next time you open the excel program, it will also pop up the box, ask whether to save, if you choose no, then all in vain; It is best to replace it with an access database, so that even if there is an interruption or power outage in the middle, the previous data will still exist and will not be done in vain. If you really want to use an excel file, you can export it from MDB to Excel.

    If I use MDB, I happen to have written a few similar industry applications recently, and I can change one slightly.

  9. Anonymous users2024-01-29

    <> "Before excel**, I can still help you answer general questions!"

  10. Anonymous users2024-01-28

    360 researchers analyzed that the implanted Trojan was written in the language (which is characterized by programming through Chinese). The Trojan used a method of tampering with network settings to hijack the computer's request for access to the seven major banks in South Korea into a vicious wish.

  11. Anonymous users2024-01-27

    Ask for the same thing, and you can also give a simple hint to the great god!

  12. Anonymous users2024-01-26

    How simple is it??? You can say it. Let's see if I will.

  13. Anonymous users2024-01-25

    This is the problem of easy language. Why are people who have used Yi Language no longer use him, this is where Yi Language is rubbish, the program makes mistakes for no reason, and it is okay to use Yi Language to do some foolish programs, but if you make some regular use of software, Yi Language will not work.

    Speaking of your problem, the easy language program is inseparable from his most basic support library, that is, this system support library, it is generally recommended that when you release your program, it is best to put this support library and your program together to ensure that your program error rate is small. Generally, when you write a program, add this support library to the **resource and write ** to the file in the event that the startup window is created (take the running directory () + your name in the **resource), which will reduce the error rate of your program.

    In addition, when compiling the program independently, you must ensure that the support libraries you use have been compiled, otherwise there will be errors in running.

    There are still many problems and vulnerabilities in Easy Language, and it is recommended to use VB or Delphi to do software.

    For example, if you put your Easy Language program together with a folder with a name, your program won't run at all. There are many more, all of which are the shortcomings of easy language, so friends should learn something else.

  14. Anonymous users2024-01-24

    If it is possible, the operation can be specified at the specified location.

  15. Anonymous users2024-01-23

    No, because excel is encrypted data, you can't know what its encryption algorithm is, and you can't read it directly through this thing.

  16. Anonymous users2024-01-22

    You'll have to look it up on the Internet

  17. Anonymous users2024-01-21

    I can read the content of txt to easy language.

  18. Anonymous users2024-01-20

    Method steps.

    Create a "Windows Window Program" using the easy-language programming environment. Click on the menu "Tools" - >Support Library Configuration" item.

    In the window that opens, find and check "Universal Object Support Library" and click "OK" to add the "Mega List Box" component.

    Note: Place the file in the same directory as the Easy Language program itself.

    Make sure "Launch window" is checked, and then add a "Created Completed" event for it.

    Version 2 supports the library iext

    If true (external database 1.)Open ("odbc; dbq=" Fetch the current directory ()driver=; driverid=790;fil=excel ;maxbuffersize=2048;maxscanrows=8;pagetimeout=5;readonly=0;safetransactions=0;threads=3;uid=admin;usercommitsync=yes;", false).

    Infobox ("Database connection failed!") ", error icon, )

    Return () if it's really over.

    query statement select * from [sheet1$]".

    Recordset External Database 1Query (query statement).

    If true (recordset 0).

    Infobox ("Query failed!") ", error icon, )

    Return () if it's really over.

    External Database 1First-to-first record (recordset).

    Partial counting 1

    Superlist Box 1Insert columns (,ordinal number,80,,megalist box 1.).Insert columns (,Name,80,,Megalist Box 1.).Insert columns (, gender, 80, , superlist box 1.)Insert columns (, age, 80, , judgment cycle header (external database 1.)After the tail record (recordset false).

    Partial Temporary A External Database 1Read (Recordset, 1).

    Local Temporary B External Database 1Read (Recordset, 2).

    Local Temporary C to Text (External Database 1.)Read (Recordset, 3)).

    Index Superlist Box 1Insert a table entry (, Megalist Box 1.)Set the title (index, 0, to text (local counting)).

    Superlist Box 1Set the title (index, 1, part temporary a).

    Superlist Box 1Set the title (index, 2, part, temporary).

    Superlist Box 1Set the title (index, 3, part temp c).

    External Database 1to the next record (recordset).

    Local Counting Partial Counting 1

    Judge the end of the cycle ().

    External Database 1Close the recordset(s).

    7. Finally, click the "Run" button, and you can see that Yi Language has successfully referenced the data in Excel**.

  19. Anonymous users2024-01-19

    Use the "External Database" portlet, or the "Excel Program" and "Excel Workbook" portlets.

    In the first way, there is a certain possibility of errors when encountering text data and numerical data, and if Excel is all text or all numbers, it will be fine.

    The second method is a more complete call to excel

  20. Anonymous users2024-01-18

    .Version 2

    Support library eexcel2000

    Subroutines read data, textual.

    Parameter x, integer type.

    Parameter y, integer type.

    The local variable temp, textual.

    temp character (y 64) to text (x) excel workbook 1The first cell of tempexcel workbook 1The last cell temp returns (Excel Workbook 1.)contents).

    Subroutines write data.

    Parameter temp, textual.

    Parameter x, integer type.

    Parameter y, integer type.

    Local variable a, textual.

    A character (y 64) to text (x) excel workbook 1First cell a

    Excel Workbook 1Tail cell a

    Excel Workbook 1Content temp

Related questions
2 answers2024-02-29

Hello, the myths and legends about the moon include the Jade Rabbit Pounding Medicine, Wu Gang Fa Gui, Chang'e Running to the Moon, Tengu Eclipse of the Moon, Moon Goddess, etc. >>>More

10 answers2024-02-29

Writing ideas: Mainly use humor to write why he is a humorous person. >>>More

3 answers2024-02-29

Now we are with death.

Check out the information for yourself. >>>More

11 answers2024-02-29

It's not interesting, it's just that there's these members and methods in this category.

3 answers2024-02-29

To set up a question is to ask oneself and answer oneself. Such as: >>>More