Answer the question
In order to leave comments, you need to log in
How to write a program to work with Excel spreadsheets?
At school, a friend and I were assigned to make a program to work with an Excel spreadsheet that contains a large list of school students. It is necessary to make a program that could sort this table according to certain parameters (for example, alphabetically) and return elements that meet the specified parameters (for example, grade 11B, average grade of at least 4.4)
We know Delphi and Java. What is the easiest and fastest way to make such a program? What libraries or tools to use?
Answer the question
In order to leave comments, you need to log in
Excel has a built-in Basic language. You can do everything without going beyond Excel itself: write a macro, add buttons that call the macro with the necessary parameters.
If the meaning of the task is in a separate program, then the task is approximately the following: open an Excel file, read all non-blank lines from it and load them into a table in your program. Further, everything is done by means of the language, nothing depends on Excel.
How to open and read the file will prompt Google for the query "{language} Excel".
The assignment is strange. But sometimes you really need to process such documents not in editors.
Here is a set of libraries that you need if you are implementing in Java
mvnrepository.com/artifact/org.apache.poi
https://poi.apache.org/spreadsheet/examples.html
It's hard to imagine a more stupid task! If the data is already in Excel, then you need to analyze it using its own tools. There are more than enough of them. And the calculations of all sorts of averages, sorting, etc. are the most basic functions.
Well, if the essence of the task is to write an external program, then do not complicate it and upload the data to some CSV. And you can read it in any language!
It is possible to work with Excel in Delphi, almost like with StringGrid through OLE objects.
I remember it was necessary to remake files from a text document to Excel, it turned out to be quite simple.
All the necessary theory on OLE is on the Internet and is quite clearly stated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question