Using DataBars from Macro

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Alvin2
Posts: 1
Joined: Fri Mar 20, 2020 6:41 pm

Using DataBars from Macro

Post by Alvin2 »

Hi All,
Despite a careful search I didn't find anything in the web that could explain how to manage DataBars from CalcBasic macros.
I also tried to figure out something using the macro recorder, but it also didn't help.
I have some single column tables that I periodically create from scratch and sort using macros.
To better grab the meaning of the tables I use the DataBars, that usually I set manually. That's cumbersome, so I'm trying to set
databars programmatically, but, at present, have no idea on how to achieve it.
Of course I also looked into Pitonyak "Bible", no way.
Please can someone address me to a suitable reading or, better, show me some practical example?
Best Regards
Alvin2
OpenOffice 4.16 on Win7-64
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: Using DataBars from Macro

Post by F3K Total »

Hello,
send one of your files that you periodically create from scratch and sort using macros, and one .ods with manually set databars as you like to have them.
Maybe https://wiki.openoffice.org/wiki/MediaW ... e_-_Charts helps
or http://www.openoffice.org/api/basic/man ... torial.pdf page78 ff. 4.4.3.1 Creating barcharts
Find also attached an example.
R
Attachments
ChartByCode.ods
(13.76 KiB) Downloaded 178 times
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Using DataBars from Macro

Post by Lupp »

Alvin2 wrote:I have some single column{emphasis by Lupp} tables that I periodically create from scratch...
What is your question about:
-1- Bar Charts?
-2- The 'Data Bar' variant of the 'All cells' mode of ConditionalFormatting?
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
AndresSolar
Posts: 72
Joined: Sun Jun 26, 2016 5:42 am

Re: Using DataBars from Macro

Post by AndresSolar »

I use a custom font (FastBar) and a simple cell-formula to scale to % for the same purpose.
Very fast - and simple to manipulate via macro. Works on single cells and ranges and enables conditional formatting (color limits, etc.)
LO6.2 on OS-X Mojave 10.14.3
Post Reply