0

I am experienced in data analysis itself, but I am a beginner in terms coding or programming that is directed towards "software engineering".

For my work I often have to use a third-party software to get a specific excel file which contains data I have to analyse in R (on a Windows machine). This process always looks the same: start the program via the exe, click some buttons put in some text into some text-fields, click a button again and then "save as" the file.

I would like to do this automatically as part of an R script where the rest of the analysis happens, but I was unable to find meaningful resources, especially catering to my rather beginner level of programming or software engineering.

Is that even possible in R at all? I have found some promising resources regarding other languages, however I would very much prefer to do this in R if possible.

Can i emulate the input through the gui? Do I have to find out what is actually done "behind the scenes" when i click a button in this package? If yes, how does one do to find this information?

I know that it is relatively easy to start programs via .exe files with the system and system2 package, but I do not understand how i then further interact with these programs. I have also found references to the processx package, but I did not find much in regards to tutorials or such in how to use it (besides starting or ending a process).

Glad for any form of help!

Edit to make aim more clear: It is Not possible nor do i want to what the Program is doing itself done in R.

The program creates a dataset from external unobtainable sources. I want r to start the Program, Tell it what Dataset IT should create via Input and Thema Close IT again.

The Python Module win32com seems to be able to do that

Joey
  • 3
  • 2
  • 1
    I don't know of a good way to do this within R; you might look at a tool like Sikuli (http://doc.sikuli.org/) which is more purpose-built for gui automation. You could probably trigger a script there to run from R... – Jon Spring Mar 15 '23 at 22:52
  • If you have example input data and the subsequent output after 'processing' you may be able to reverse-engineer the steps involved and implement them in R. I've done something similar to incorporate 'processes' from several different languages into a single low-level language. As it stands this question will likely be closed as it is not [on topic](https://stackoverflow.com/help/on-topic) for stackoverflow. If you edit your question to include a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) you may get some advice on how to approach the issue – jared_mamrot Mar 15 '23 at 22:56
  • Have you tried the `edit` function? `MyData = data.frame(); edit(MyData)` – G5W Mar 15 '23 at 23:05

0 Answers0