A
A
Arthur2021-04-22 22:58:43
Oracle
Arthur, 2021-04-22 22:58:43

Is it possible to automate the daily report?

Hello. At work there is an hourly report, there is a great desire to automate it.
The report is built as follows:
1 There are ready-made scripts in Oracle, in which I only change the date for today and the time (I change every hour)
2. Then I scroll through the query and insert its result into the necessary Excel sheets.
3. With each insertion of the query result, I extend the date, time and formula in the sheet.
4. Next, I update the summary for each data sheet.

Are there any options how to automate this business for my minimum participation?
I will provide more information if needed.

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-04-23
@rPman

Microsoft Office allows you to load data on a page on request into an sql database, in Excel there is a whole gui - data connection wizard for this.
You have sql scripts, the maximum is to make the variables (for example, the date for the report) taken from some table in the database itself (it will be easier this way).
Programming in Excel is incredibly easy and difficult at the same time. Difficult - even for someone already familiar with programming, some things are implemented there in a strange and inconvenient way. It's simple - because there is a ready-made code generator - you press the button - start recording the macro, then do actions with the mouse buttons and others, then press - stop recording the macro and look at the generated code (even such commands as save the file as). This approach allows you to understand what code needs to be done for what actions, with little or no swarming in inconvenient documentation.
In addition, most likely it will be necessary to automate only the mechanism for saving the report to a document that is decoupled from the database. The dumbest thing is to make 2 pages in the template, one empty - where the result will be copied, the other - a template with logic and connection settings, from where the result will be copied to the first, then the original page is deleted, and the document is saved under the desired name.
In total, the task of building reports will come down to editing the necessary report parameters in the database (oracle console utilities for executing scripts, for example, or from the same program on excel, since there you can make full-fledged forms with buttons in macros), somehow specifying the file name to save the resulting report and open the template file.
ps automation of work with excel macros for neophytes looks like magic - a document opens, data begins to appear in it right before our eyes, save and open new files (yes, excel is incredibly slow, so much so that it can be seen by a person).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question