We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

jcs94782's profile - activity

2021-05-26 21:28:53 +0200 received badge  Famous Question (source)
2021-05-26 21:28:53 +0200 received badge  Notable Question (source)
2021-03-20 00:11:32 +0200 received badge  Taxonomist
2021-01-01 13:17:24 +0200 received badge  Nice Answer (source)
2020-09-01 08:56:20 +0200 received badge  Popular Question (source)
2020-08-31 22:09:26 +0200 commented question Unable to edit styles in Calc

I did initially create the file in LibreOffice calc but initially wanted it to be capable of being opened in Excel. I ce

2020-08-31 17:27:58 +0200 commented question Unable to edit styles in Calc

Unfortunately the spreadsheet in question contains sensitive data so I am unable to post it. Since posting I have test

2020-08-31 16:21:57 +0200 asked a question Unable to edit styles in Calc

Unable to edit styles in Calc I need to define some custom styles in calc to be used in conditional formatting I can su

2020-08-06 14:15:31 +0200 received badge  Notable Question (source)
2020-08-06 14:14:48 +0200 received badge  Famous Question (source)
2020-07-23 21:01:07 +0200 received badge  Popular Question (source)
2020-07-06 17:29:16 +0200 received badge  Self-Learner (source)
2020-07-06 17:29:16 +0200 received badge  Teacher (source)
2020-07-06 17:05:14 +0200 answered a question Calc setting borders via a macro

Thanks for all of your comments and suggestions. I followed the hints contained mainly in Lupp's suggestion above and d

2020-07-06 14:35:00 +0200 received badge  Supporter (source)
2020-07-06 14:34:23 +0200 marked best answer Calc setting borders via a macro

I have been trying to format borders via a macro. I have managed to get most of it to work but have one problem I cannot resolve.

I want to set the borders on a range of cells. I want to have Left/Top and Right borders to be bold. I want the vertical and horizontal borders to be thinner.

However I would like the bottom border to be a double line. If I have read the documentation correctly I need to set an InnerLineWidth and LineDistance properties. When I set either of these to any value it stops the bottom border being displayed at all.

I have distilled the code into the following (adapted from another post)

Sub Main
Dim BasicBorder as New com.sun.star.table.BorderLine
Dim oBorder As Object
Dim rng
rng  = ThisComponent.Sheets.getByName( "Sheet" ).getCellRangeByPosition(1,1,2,2)
oBorder = rng.TableBorder

BasicBorder.Color = RGB(255, 0,0)
BasicBorder.OuterLineWidth = 20
oborder.VerticalLine = BasicBorder
oborder.HorizontalLine = BasicBorder

BasicBorder.OuterLineWidth = 60
oBorder.LeftLine = BasicBorder
oBorder.TopLine = BasicBorder
oBorder.RightLine = BasicBorder

' enabling either or both of these lines prevents the border being displayed    
'   BasicBorder.LineDistance =30
'   BasicBorder.InnerLineWidth = 40
oBorder.BottomLine = BasicBorder

rng.TableBorder = oBorder
End Sub

It all works apart from my bottom border. To make this a double line I think that the two lines commented out (linedistance and innerlinewidth) should make this a double line. Adding either of these lines however stops any bottom line being displayed.

How do I create a double line as my bottom border? The screen shot shows what I am trying to achieve

image description

LibreOffice Calc version 6.4.4.2 (x64) running on Windows 10 Home version 1909

2020-07-05 18:14:36 +0200 commented answer Calc setting borders via a macro

Thanks for all of the comments. For my purposes I will just choose a different colour for the bottom border rather than

2020-07-05 16:31:16 +0200 received badge  Notable Question (source)
2020-07-05 12:09:13 +0200 commented answer Calc setting borders via a macro

Thanks but this just draws a double line at the bottom of the selection. I need the left, right, top and inner borders a

2020-07-05 12:09:01 +0200 commented answer Calc setting borders via a macro

As I think you identified. If I select a single cell it works but if I select a range (as I wanted to do) it just draws

2020-07-05 02:36:03 +0200 received badge  Popular Question (source)
2020-07-04 20:06:15 +0200 received badge  Famous Question (source)
2020-07-04 18:45:35 +0200 asked a question Calc setting borders via a macro

Calc setting borders via a macro I have been trying to format borders via a macro. I have managed to get most of it to w

2020-07-04 18:06:57 +0200 received badge  Editor (source)
2020-07-03 13:14:15 +0200 asked a question Calc Basic format borders colour setting seems wrong

Calc Basic format borders colour setting seems wrong I am trying to format some cells in a sheet using Basic macros. I h

2020-06-18 15:40:08 +0200 received badge  Famous Question (source)
2020-05-21 19:34:00 +0200 received badge  Enthusiast
2020-05-05 00:00:39 +0200 commented answer Base - Execute SQL command

Thank you - that is the answer! I was hoping to include the Create SQL statement as well but that is not supported. I c

2020-05-04 23:59:30 +0200 marked best answer Base - Execute SQL command

I have been following a Base tutorial where it was possible to paste in multiple SQL statements into the Execute SQL Window separated by semicolon. However I always get an error when I try. The tutorial used version 4.x of LO and the previous SQL engine.

CREATE TABLE "Members" ( "ID" INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, "FirstName" VARCHAR(20) NOT NULL , "LastName" VARCHAR(20) NOT NULL, "EmailName" VARCHAR(20), "EmailDomain" VARCHAR(20), "DateJoined" DATE );

INSERT INTO "Members" ("FirstName", "LastName", "EmailName", "EmailDomain") VALUES ('test','user2','testuser2','soroban.co.uk');

Error report

1: firebird_sdbc error: *Dynamic SQL Error *SQL error code = -104 *Token unknown - line 9, column 1 *INSERT caused by 'isc_dsql_prepare'

If I enter these SQL statements one at a time they work.

I am an experienced programmer (55+ years), very experienced with Excel including extensive use of macros, but I am attempting to use a relational database for the first time. This is just to enter my test data so I can work round it but is there a solution?

2020-05-04 23:59:30 +0200 received badge  Scholar (source)
2020-05-04 23:11:30 +0200 received badge  Notable Question (source)
2020-05-04 23:02:07 +0200 received badge  Student (source)
2020-05-04 21:43:36 +0200 commented answer Base - Execute SQL command

Bug reported - 132693

2020-05-04 18:40:24 +0200 received badge  Popular Question (source)
2020-05-04 13:49:27 +0200 asked a question Base - Execute SQL command

Base - Execute SQL command I have been following a Base tutorial where it was possible to paste in multiple SQL statemen

2020-02-27 20:45:08 +0200 received badge  Notable Question (source)
2020-02-27 12:11:15 +0200 edited question Calc Mailto need to enter a £ symbol

Calc Mailto need to enter a £ symbol I am using Calc to generate an email via a "mailto" Hyperlink. The email hyperlink

2020-02-26 16:51:59 +0200 received badge  Popular Question (source)