Here is an example in StarBasic code: Sub refresh_DBRanges Refreshing the imported data can be done through an API call. Now you can import any tables or views (from the MySQL component) or queries (from the Base file) into Calc: Using registered datasources in Calc Once the file is registered, any open LibreOffice component can access the data from MySQL (Base file can be closed). Make sure to 'register' the Base file so the rest of LibreOffice can 'see' it. I think the easiest way to approach this would be to create a Base file with your MySQL database as its back-end (note Base will only be able to see tables and views from MySQL - it won't import queries although you can save queries in the Base file if you want). While by default it uses an embedded version of HyperSQL database to manage the tables, it comes with drivers for any number of other back-end programs, including MySQL. The LibreOffice component Base is a database front-end that handles queries, forms, and reports.
0 Comments
Leave a Reply. |