[Solved] How to get regression from an AOO Base Table
Posted: Sun Oct 04, 2015 5:31 am
Hello!
I have some charts of Foreign Exchange rates. Currently I do an OO Calc TREND function to extend the past N days to the next N days. This tells me (¡obviously!) whether the rates are going up or down or staying neutral. To be precise, what the last N days have been. This gives a crude heuristic as to whether to do anything or not with the cash on the wrong side of the ocean ...
I would like to code a bit of macro to simulate the TREND sufficiently to tell me whether the slope of the trendline is downwards or not, nothing more.
A sledgehammer walnut approach would be to register the spreadsheet with Base and grab the data that way, but that has several drawbacks not the least being timeliness (needs a manual hit to update).
So, is there something more elegant available using something like
which would read the table and spit out somewhere, in another table (or wherever I choose within the macro) the simple boolean I need?
Thanks in advance
David
Afterthought
It would be acceptable to have a macro that will [silently] read the database into a spreadsheet, create a chart, and figure out the trend from there, if the mechanisms exist to do so.
I have some charts of Foreign Exchange rates. Currently I do an OO Calc TREND function to extend the past N days to the next N days. This tells me (¡obviously!) whether the rates are going up or down or staying neutral. To be precise, what the last N days have been. This gives a crude heuristic as to whether to do anything or not with the cash on the wrong side of the ocean ...
I would like to code a bit of macro to simulate the TREND sufficiently to tell me whether the slope of the trendline is downwards or not, nothing more.
A sledgehammer walnut approach would be to register the spreadsheet with Base and grab the data that way, but that has several drawbacks not the least being timeliness (needs a manual hit to update).
So, is there something more elegant available using something like
Code: Select all
"c:\Program Files (x86)\OpenOffice 4\program\soffice.exe" -headless -n "macro:///[library].[module].[macro]()"
Thanks in advance
David
Afterthought
It would be acceptable to have a macro that will [silently] read the database into a spreadsheet, create a chart, and figure out the trend from there, if the mechanisms exist to do so.