Pergunte aqui

Perfil de Kees - atividade

2015-11-16 14:24:26 +0200 Medalha recebida  Pergunta notável (fonte)
2015-11-16 14:24:26 +0200 Medalha recebida  Pergunta famosa (fonte)
2014-12-12 21:55:46 +0200 Medalha recebida  Taxonomista
2014-11-09 13:49:58 +0200 Medalha recebida  Pergunta famosa (fonte)
2014-07-23 07:31:33 +0200 Medalha recebida  Professor (fonte)
2014-07-23 02:14:42 +0200 Respondeu uma pergunta Save/Store linked image files in document or version

The following worked for me:

  1. Edit -> Links...
  2. Select all links (Ctrl-A)
  3. Break Link
2014-06-30 21:54:16 +0200 Medalha recebida  Pergunta boa (fonte)
2014-01-29 20:07:47 +0200 Medalha recebida  Pergunta famosa (fonte)
2013-12-28 04:13:10 +0200 Medalha recebida  Torcedor (fonte)
2013-12-28 04:13:02 +0200 Resposta comentada Create a PDF for every sheet, named after the sheet

Thank you so much for doing this, it saved me including the stuff from that link you found and it works great. This will save me lots of time.

2013-12-20 21:53:59 +0200 Medalha recebida  Pergunta notável (fonte)
2013-12-20 11:02:28 +0200 Pergunta comentada Create a PDF for every sheet, named after the sheet

The join, split statement does not need a space in the double quotes, it is there to strip spaces out of the sheet names, and adding a space in the double quotes would put it back in.

2013-12-20 11:01:21 +0200 Pergunta comentada Create a PDF for every sheet, named after the sheet

Moving the dim statement did work, now I don't get the error anymore. The only problem is now that I get a pdf of all the sheets for every sheet name. For instance if I would have sheet 1, sheet 2, sheet 3, sheet 4 and sheet 5, then I get three PDFs called sheet3.pdf, sheet4.pdf and sheet5.pdf, they all will be the same and contain all five sheets. Where I would like three PDFs, sheet3.pdf containing sheet 3, sheet4.pdf containing sheet 4, and sheet5.pdf containing sheet 5.

2013-12-20 09:10:00 +0200 Medalha recebida  Pergunta popular (fonte)
2013-12-20 08:31:26 +0200 Medalha recebida  Estudante (fonte)
2013-12-19 16:43:09 +0200 Pergunta comentada Create a PDF for every sheet, named after the sheet

Found the reason for the error. pdfDirectory already has the "file://" prefix, so I did not need to prefix it. It now creates a PDF of the whole document, named after the third sheet, instead of a single page PDF for every sheet (except the first thwo).

Does anyone know how I can create a pdf for every individual sheet?

2013-12-19 15:31:09 +0200 Resposta comentada Count rows based on three criteria, including blank cell

Thanks that really helped. It works, though it seems a little unintuitive, I would never have worked out by myself to use this function for what I was trying to do.

2013-12-19 15:28:23 +0200 Medalha recebida  Acadêmico (fonte)
2013-12-19 15:28:16 +0200 Medalha recebida  Pergunta notável (fonte)
2013-12-19 15:26:14 +0200 Medalha recebida  Editor (fonte)
2013-12-19 15:25:09 +0200 Perguntou Create a PDF for every sheet, named after the sheet

I am trying to create a individual pdf for every sheet in spreadsheet (except the first two) and name the pdf the same as the name of the sheet (sheet names can contain spaces).

So far I have come up with the following (based on a lot of googleing):

Sub ExportAsPDFs
    dim document, oFolderDialog as object
    dim pdfDirectory as string
    dim i, iExec as integer

    oFolderDialog = CreateUnoService("com.sun.star.ui.dialogs.OfficeFolderPicker")
    iExec = oFolderDialog.Execute
    if iExec = 1 then
        pdfDirectory = oFolderDialog.Directory + "/"

        document = ThisComponent.CurrentController.Frame
        dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
        names() = ThisComponent.Sheets.getElementNames()
        for i = 2 to ubound(names)
            dim args1(2) as new com.sun.star.beans.PropertyValue
            args1(0).Name = "URL"
            args1(0).Value = "file://" + pdfDirectory + join(split(names(i), " "), "") + ".pdf"
            args1(1).Name = "FilterName"
            args1(1).Value = "calc_pdf_Export"
            args1(2).Name = "PageRange"
            args1(2).Value = i + 1

            dispatcher.executeDispatch(document, ".uno:ExportDirectToPDF", "", 0, args1())
        next i
    endif
End Sub

This mostly seems to work, except for the last cucial line. I suspect I am doing something wrong somewhere, but am not sure what or where. The error I get is:

Error saving the document <document name>:
General Error.
General input/output error.

Any help would be greatly appreciated.

2013-12-15 23:24:31 +0200 Medalha recebida  Pergunta popular (fonte)
2013-12-09 03:38:07 +0200 Medalha recebida  Pergunta popular (fonte)
2013-12-08 15:36:22 +0200 Perguntou Count rows based on three criteria, including blank cell

I have three columns, the first two contain a date, the third one a number or a blank cell. I am trying to count all the rows in those columns where a date (in D3) falls between the dates in the first two columns and the third column contains an empty cell.

At the moment my formula looks like this:

=COUNTIFS(A2:A73,"<="&D3,B2:B73,">="&D3,C2:C73,"")

I have also tried:

=COUNTIFS(A2:A73,"<="&D3,B2:B73,">="&D3,C2:C73,ISBLANK(this.cell())

The first two critera seem to work, but as soon as I add the third one (check for empty cell) the result is always 0.

2013-12-06 16:15:46 +0200 Resposta comentada delete calc sheets from macro

Thank you so much, that does exactly what I have been trying all that time.

2013-12-06 14:44:00 +0200 Perguntou delete calc sheets from macro

I have a situation where I am trying to delete all but the first three sheets from a macro. I have been googleing and trying for a few days now, but can't get it to work. Can you let me know now if this is possible and if it is possible how I would go about it.

Thanks