Search found 111 matches

by Sébastien C
Tue Aug 16, 2022 3:49 pm
Forum: Macros and UNO API
Topic: Macro Importing PDF into Calc ODS
Replies: 5
Views: 2474

Re: Macro Importing PDF into Calc ODS

It’s an idea like any other ... with elements that I already have. But maybe it can help. The PDF files must be in the same folder as the spreadsheet (but this is obviously changeable according to your needs). Clicking once on the preview IT SELF launches the PDF file reader installed by default on ...
by Sébastien C
Fri Aug 05, 2022 7:00 pm
Forum: Macros and UNO API
Topic: [Solved] Remove empty/blank strings at the end of cell
Replies: 9
Views: 3769

Re: How to remove empty/blank strings at the end of cell with UNO api?

I quote you the excellent book of Bernard Marcelly which helps us, French speakers, to access to the API, perhaps more easily than the equally excellent text by Andrew Pitonyak . But you have to know how my translation is undoubtedly very bad ... Move the write cursor The cursor object has several m...
by Sébastien C
Wed Aug 03, 2022 6:59 pm
Forum: Macros and UNO API
Topic: [Solved] Remove empty/blank strings at the end of cell
Replies: 9
Views: 3769

Re: How to remove empty/blank strings at the end of cell with UNO api?

Absolutely not, I'm not sure I understand the sergeevms question but if I understand it correctly, then I disagree. There are still write cursors that allow you to work on the text IN the cell, just like in Writer. Sub Main Dim myCell As Object, myCursor As Object Dim myBreak As String myCell = thi...
by Sébastien C
Fri Jul 22, 2022 7:27 pm
Forum: Macros and UNO API
Topic: How to Import csv file in calc when downloading is completed
Replies: 11
Views: 1865

Re: How to Import csv file in calc when downloading is completed

An example to obviously work according to your needs. Your system work with M$-Window$ and I assume you will have installed CURL in C:\curl-7.84.0_6-win64-mingw\bin\ If not, you will know how to correct (or change your PATH system). I notice (without having looked for a solution) that OpenOffice ask...
by Sébastien C
Fri Jul 22, 2022 5:16 pm
Forum: Macros and UNO API
Topic: How to Import csv file in calc when downloading is completed
Replies: 11
Views: 1865

Re: How to Import csv file in calc when downloading is completed

It's a cookie issue. The page https://www.nseindia.com/market-data/live-market-indices gives you, via javaScript , access to the CSV file (Download (.csv)) ONLY if it has written a cookie in your browser . Solution: Install CURL on your machine. use CURL and save cookies beforehand by reading the fi...
by Sébastien C
Fri Jul 22, 2022 3:32 pm
Forum: Macros and UNO API
Topic: How to Import csv file in calc when downloading is completed
Replies: 11
Views: 1865

Re: How to Import csv file in calc when downloading is completed

Give us a correct address (without underscore), possibly in private message if it is private for you; so that we can do real tests. There, you may be able to hope that we make an effort of which you prove very little the reciprocal. Otherwise, I suggest that you do not ask questions whose answers ar...
by Sébastien C
Wed Jul 20, 2022 10:53 pm
Forum: Macros and UNO API
Topic: How to Import csv file in calc when downloading is completed
Replies: 11
Views: 1865

Re: How to Import csv file in calc when downloading is completed

Hi there, Dear Lovepreet323 , I've been reading you since this morning and I still don't understand why you store the CSV file first on your hard disk to read it later... Why not, for example, import the CSV directly into a sheet from Calc? Why launch a browser on, I assume, a CSV file, when the “ f...
by Sébastien C
Sun Jul 10, 2022 12:27 pm
Forum: Macros and UNO API
Topic: [Solved] Impress Macro Not Working After Opening Draw
Replies: 12
Views: 1670

Re: Impress Macro Not Working After Opening Draw

Hello everyone ! I did EXACTLY the same actions as described in the video with LibreOffice (Version 7.3.4.2), i.e. open the Impress file AFTER the Draw file, then launch the macro. On Linux and on M$-Win (10), with LibreOffice , I do NOT reproduce. Because I also wanted to know OpenOffice ’s reactio...
by Sébastien C
Sun Jul 03, 2022 6:55 pm
Forum: Macros and UNO API
Topic: [Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.
Replies: 13
Views: 2074

Re: [Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.

The princip : Choose source folder (“ Choisir le dossier source. ”) Choose target folder (“ Choisir le dossier cible. ”) Loading the list from source folder (“ Charger la liste du dossier source. ”) Execute the ImageMagick ’s script on the lines checked by ☑ (“ Script ImageMagick exécuté sur les lig...
by Sébastien C
Sun Jul 03, 2022 4:57 pm
Forum: Macros and UNO API
Topic: [Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.
Replies: 13
Views: 2074

Re: [Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.

Seems to me that would disallow the ability to play with spreadsheet cell formulas. Unlike LibreOffice , I’m not sure if it works on the OpenOffice you’re using because file dates (“ Date du fichier ”) are inserted expressly like spreadsheet-dates and, for time processing, there are API differences ...
by Sébastien C
Sun Jul 03, 2022 1:55 pm
Forum: Macros and UNO API
Topic: [Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.
Replies: 13
Views: 2074

Re: [Calc] Read the ACTIVE style of a cell in conditional formatting.

Dear All, @ Lupp The germanity of your literalness is matched only by the effectiveness of your answer! VIE-LEN DANK! I couldn’t ask for more!!! The workaround you propose is still very complicated; I prefer to slightly change my own concept to arrive at the finality that I proposed to myself. Maybe...
by Sébastien C
Fri Jul 01, 2022 1:27 pm
Forum: Macros and UNO API
Topic: [Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.
Replies: 13
Views: 2074

Re: [Calc] Read the ACTIVE style of a cell in conditional formatting.

Thank you very much again Jeje for this attempt, the syntax of which I appreciate, by the way. But, as I probably did not emphasize enough in my two previous posts, I am not in control of the conditional formatting expressions that my users will use . In what you propose, we have an equality from wh...
by Sébastien C
Fri Jul 01, 2022 12:25 am
Forum: Macros and UNO API
Topic: [Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.
Replies: 13
Views: 2074

Re: [Calc] Read the ACTIVE style of a cell in conditional formatting.

MRI , Xray or even my little macro ( showColorsC3 ) say “ default ”... In my case (a bit too long to tell here) I want to give to the user the possibility to put as many conditions as he wants. So that also means as many styles. If we know the name, deducing the characteristics of a style (for exam...
by Sébastien C
Thu Jun 30, 2022 10:05 am
Forum: Macros and UNO API
Topic: [Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.
Replies: 13
Views: 2074

[Issue][Calc] Read the ACTIVE style of a cell in conditional formatting.

Hello everyone! I have a problem that I can't solve. I have a cell formatted with a style. I don't have a problem for reading it. (myCell.cellStyle). I have another cell, this time with conditional formatting. Its style is therefore variable, depending on a condition (no matter which one). I would s...
by Sébastien C
Mon Apr 12, 2021 5:47 pm
Forum: Extensions
Topic: Generate QR Code from a cell
Replies: 3
Views: 9965

Re: Generate QR Code from a cell

Hello, All, Typically, the original extension, written in javaScript , is fine. It can also be verified on the site of the original author ( Kazuhiko Arase ). Where the shoe pinches is that this is an adaptation in a language hardly worn in the office suite. And this adaptation (by Cyril Beaussier ,...
by Sébastien C
Sun Apr 04, 2021 10:55 pm
Forum: Macros and UNO API
Topic: Script to populate Calc fields from the web
Replies: 4
Views: 4393

Re: Script to populate Calc fields from the web

A little more, or more exactly, a way of doing things differently. Enter the ISBN or the bar code of the book in cell B3 of the "Datas" page. This means that it is therefore possible to enter this value via a barcode scanner ( EAN 13 )... Once entered, the call to the Google ’s API is done...
by Sébastien C
Sun Apr 04, 2021 3:28 pm
Forum: Macros and UNO API
Topic: Script to populate Calc fields from the web
Replies: 4
Views: 4393

Re: Script to populate Calc fields from the web

Hello to all, It seems to me that the problem presented here is less focused on using a database rather than a spreadsheet as it is, I think, a bit too rehashed. For starters, the Basic posted here by " othermeans " is not LibreOffice Basic but VBA from YouKnowWho . And the problem it expo...
by Sébastien C
Wed Dec 23, 2020 1:07 am
Forum: Macros and UNO API
Topic: Documentation for scalc: Text - txt - csv (StarOffice Calc)?
Replies: 6
Views: 2363

Re: Documentation for scalc: Text - txt - csv (StarOffice Ca

Hello all ! An example extract from the beginning of this code snippet and this CSV . The REMs can be useful I think... Sub readCSV() Dim myCSVdocument As Object, mySheet As Object Dim myOptions(2) As New com.sun.star.beans.PropertyValue myCSVFile = "/here/you/have/to/set/the/path/of/the/file/n...
by Sébastien C
Mon Mar 30, 2020 8:23 pm
Forum: Macros and UNO API
Topic: Accessing Push Button or Text Box or LabelField with code
Replies: 3
Views: 1584

Re: Accessing Push Button or Text Box or LabelField with cod

A function “ findObjectByName ” is available in the book (in French) «  Programmation OpenOffice.org et LibreOffice  » by Bernard Marcelly and Laurent Godard , Eyrolle editor. The editor offers, in free reading, the appendix where, precisely, it is located. This is page 24/695 of this PDF . «  Reche...
by Sébastien C
Sun Mar 01, 2020 2:47 am
Forum: Macros and UNO API
Topic: [Basic] List a directory with SFA and an Unix pattern.
Replies: 37
Views: 16312

Re: [Basic] List a directory with SFA and an Unix pattern.

A big thank you to all of you, for all your interventions. Still receive my apologies for the slowness of my present answer. I had prepared it (always first written in French, but "RPG" went before to ... basically say what I think ... Difficult, after that, to take up my own thread, let a...
by Sébastien C
Fri Feb 28, 2020 1:10 am
Forum: Macros and UNO API
Topic: [Basic] List a directory with SFA and an Unix pattern.
Replies: 37
Views: 16312

Re: [Basic] List a directory with SFA and an Unix pattern.

Thank you very much for your intervention, RPG ; you fully understand my request. The " like " operator is poorly documented. But we are lucky, in French, to have Bernard Marcelly's book which gives us good examples and shows us cases very close to regular expressions. It is with this book...
by Sébastien C
Fri Feb 28, 2020 12:26 am
Forum: Macros and UNO API
Topic: [Basic] List a directory with SFA and an Unix pattern.
Replies: 37
Views: 16312

Re: [Basic] List a directory with SFA and an Unix pattern.

@ Jeje The problem is not to find a solution for filter files with regular expression or strings treatment ( left , right , mid , instr , &c.) ; we know to do that. The problem is to allow users to give a pattern, that respect a standard commonly used. For example, if you type in a linux console...
by Sébastien C
Thu Feb 27, 2020 11:21 pm
Forum: Macros and UNO API
Topic: [Basic] List a directory with SFA and an Unix pattern.
Replies: 37
Views: 16312

Re: [Basic] List a directory with SFA and an Unix pattern.

@ RoryOF I am sorry if I have been rude to you; I apologise really if it the case for you. But the question is really not where you wanted to take us. @ JeJe I easily understand your proposals. Now imagine that we let the user choose to create his own patterns himself (in a dialog box, in a Calc cel...
by Sébastien C
Thu Feb 27, 2020 10:28 pm
Forum: Macros and UNO API
Topic: [Basic] List a directory with SFA and an Unix pattern.
Replies: 37
Views: 16312

Re: [Basic] List a directory with SFA and an Unix pattern.

Uh, I think you haven't understood RoryOF yet! I know how to use this filePicker perfectly; I even did it already; several times. But I do NOT want to use filePicker ; just have a variable that contains, as with Dim (code above), a list of files responding to a pattern filter. And that, without havi...
by Sébastien C
Thu Feb 27, 2020 10:02 pm
Forum: Macros and UNO API
Topic: [Basic] List a directory with SFA and an Unix pattern.
Replies: 37
Views: 16312

Re: [Basic] List a directory with SFA and an Unix pattern.

Oh I am sorry RoryOF ! I do not talk about " com.sun.star.ui.dialogs.FilePicker " service, that manage a dialog box but about " com.sun.star.ucb.SimpleFileAccess " service, that manage files directly... It is not exacty the same thing… I understand of course that the SFA is used ...
by Sébastien C
Thu Feb 27, 2020 9:31 pm
Forum: Macros and UNO API
Topic: [Basic] List a directory with SFA and an Unix pattern.
Replies: 37
Views: 16312

[Basic] List a directory with SFA and an Unix pattern.

Since I said here that I am asking only one question, it is high time to ask a second, just to show to the entire world how much I admire the answers… But I promise one thing: make Villeroy adore the use of spreadsheets… As I am currently on the way to becoming a big boy who goes to the big school (...
by Sébastien C
Thu Feb 27, 2020 5:59 pm
Forum: Macros and UNO API
Topic: [Solved] [Calc] Visually select multiple cells.
Replies: 8
Views: 4227

Re: [Solved] [Calc] Visually select multiple cells.

I had wished an exchange like this one between guys like all of you; I am served… Sometimes it is good to say that people can, to my own contrary, go further than the simple surface or the pretty appearance… :bravo: I am going with this cheerful step to dig my head on the subject of Instances and th...
by Sébastien C
Thu Feb 27, 2020 7:40 am
Forum: Macros and UNO API
Topic: [Solved] [Calc] Visually select multiple cells.
Replies: 8
Views: 4227

Re: [Calc] Visually select multiple cells.

Thank you so much Jeje but it doesn’t work by code. I try sub test_01 Dim mySheet As Object Dim myDocument As Object, myDispatcher As Object Dim myArgument(0) As new com.sun.star.beans.PropertyValue myDocument = thisComponent.CurrentController.Frame mySheet = thisComponent.sheets.getByname(mySheetEx...
by Sébastien C
Thu Feb 27, 2020 4:19 am
Forum: Macros and UNO API
Topic: [Solved] [Calc] Visually select multiple cells.
Replies: 8
Views: 4227

[Solved] [Calc] Visually select multiple cells.

Hello There ! It is a little stupid, but I have been crashing for several days on an apparently very simple problem. So, for once, I ask the question... We all know about multiple cell selection. We click on a first and, by adding the keys [Ctrl] or [Shift] we have several blocks of cells selected, ...