Excel to PDF : multiple sheet document

Hi all,

Do you know how to include several (all?) sheets of an excel document when converting it to Pdf using M-Files PDF Processor ?

Thanks in advance,

Emmanuel

Parents Reply Children
  • Hi Thansk for your answer, and sorry for coming back so late. I do agree with your solution, but is is a bit expansive to get PDF processor just for converting Excel Files.

    My question was about the built-in PDF conversion for which I can't see any parameters that can solve my issue Disappointed

    May be womething in the registrer ?

  • Ah, I understood from your original message that you were already using PDF Processor. 

    I'm not aware of any settings related to choosing which sheets to convert for the built-in conversion functionality. One note I found in our internal records is that the dpi settings of the Excel sheets may play a part in the conversion behavior: you should have the same dpi for each sheet so that they would be included in the same conversion job. So that's something to check in the files you are testing with. Microsoft's documentation should have instructions on how to do that.

  • Hi Joonas, There are not DPI setting in excel except for print purposes, and it is one depi setting for the whole file.

    I guess M-Files is conerting to pdf by using Microsoft saveas PDF process, and in Excel the by default setting for this is "selected sheets" (see picture).

    This by defaut setting can't be changed from what I know (and I had a deep look due to a similar question in Excel VBA).

    So I think there is no way to convert a several sheets excel in PDF using M-FIles without the PDF Processor. This is a pity.

  • Yes, I think you are correct regarding the client-side conversion. You could try if you get a different result if you put the document in a workflow and use the Convert to PDF state action. The client-side and server-side conversion use different techniques for the conversion so you might have better luck with the workflow approach. Of course this doesn't really solve your issue but might be a workaround for some use cases.

  • Follow-up I thought I had already try this, but it seems not. The solution is this one :

    checkout the excel file

    select ALL the sheets you want to be exported as PDF

    save and check in the excel file

    Then a PDF conversion includes all pages :-)

  • A good workaround not to have to think to select all sheets or some specific sheets is to add a macro in excel such like 

    Private Sub Workbook_BeforeClose(Cancel As Boolean)

    Dim ws As Worksheet
    For Each ws In Sheets
    If ws.Visible Then ws.Select ([False])
    Next
    End Sub

    This way, each time the user is closing the excel file all (visible here) sheets are select and when converting it to pdf, they all well be printed.