Ask Your Question

Montyj's profile - activity

2018-08-16 21:28:08 +0100 received badge  Famous Question (source)
2018-08-16 21:28:08 +0100 received badge  Notable Question (source)
2018-01-04 04:03:37 +0100 marked best answer How to append date variable in macro to export to .pdf file?

In LO calc, I have a simple macro to export a single sheet to a .pdf file. This export line works:

oDoc.storeToURL("file:///home/username/Desktop/Spreadsheets/test.pdf", aMediaDescriptor())

But I need to append the current simple date to the filename, trying this:

oDoc.storeToURL("file:///home/monty/Desktop/Spreadsheets/test'$(date +%Y-%m-%d)'.pdf", aMediaDescriptor())

That saves the filename literally as:

test'$(date +%Y-%m-%d)'.pdf

I have tried various combinations of parenthesis and quotes but am missing something!

Thanks!

2018-01-04 02:47:51 +0100 received badge  Popular Question (source)
2018-01-03 21:34:31 +0100 received badge  Famous Question (source)
2018-01-03 21:34:31 +0100 received badge  Notable Question (source)
2018-01-03 21:34:31 +0100 received badge  Popular Question (source)
2018-01-03 17:51:08 +0100 asked a question How to append date variable in macro to export to .pdf file?

How to append date variable in macro to export to .pdf file? In LO calc, I have a simple macro to export a single sheet

2016-03-23 04:30:47 +0100 received badge  Scholar (source)
2016-03-23 04:28:50 +0100 commented answer How to search for metacharacter "\" in a function?

Please see my comment above. And yes, the regex use came from LO's online documentation. They use the example of searching for "tree." In this case they showed the example of 'escaping' the dot as

"tree\."

So I took that and ran with it, giving a backslash to 'escape' the backslash. As I said above, for some reason single or double did not work with FIND. Now I know why double didn't work!

2016-03-23 04:22:58 +0100 commented answer How to search for metacharacter "\" in a function?

Well, I am a little red-faced over this! I had tried both you examples and neither worked as part of a much more complicated statement with many functions. Then I tried a simple test in a blank cell and they would not work there either as single function calls. I just tried that again and they do indeed do work as single function statements. In the meantime I found a workaround using a forward slash where the backslash would not work. Don't know why the backslash did not work the first time!

2016-03-22 21:30:21 +0100 received badge  Editor (source)
2016-03-22 21:28:00 +0100 asked a question How to search for metacharacter "\" in a function?

I am trying to locate the position of the a string within a string that contains a backslash character "\" in a cell. Example:

String to be searched: "mobi\"

I am trying to get the position of this string using the FIND function. Example:

FIND("mobi\\";a1;) does not work; #VALUE! error.

Note: The position of "mobi\" in the string varies, so cannot use the 3rd 'position' value. Also I cannot use just the string "mobi" because the string "mobile" is present and needs to be ignored.

Thank you.

Montyj