Combine Excel Files Into One PDF File Using GroupDocs.Merger REST API Issue

Hi,
I am new to groupdocs.merger and it’s a great product. I am mergeing pdf, doc, docx, xlsx, xls and pptx using the cURL API. But the excel sheet always breaks the columns into the next page on the output pdf file.
Is there an option to set the excel documents to landscape and make the columns autofit into the A4.
Please, help out.

@godwinoluyomi

We will appreciate it if you please share your sample input documents along with the current output and expected output. It will help us to address your issue exactly.

Kindly find attached the documents as requested.

Excel testing.zip (726.8 KB)

I merged Doc 1 (xlsx) and Doc 2 (docx) and output a pdf file. I also attached the expected pdf output of the merged doc 1.

Thank you.

@godwinoluyomi

Thanks for sharing sample documents. We have logged a ticket MERGERCLOUD-57 for further investigation and will keep you updated about the issue resolution progress.

@godwinoluyomi

You can combine Excel files Into one PDF using GroupDocs.Merger REST API file in two steps. First, change the page orientation of your Excel spreadsheets and then merge the updated Excel files with other files. Please check the following documentation for details and sample orientation options for your sample document.

Change Excel Orientation in cURL

// cURL example to change page orientation
curl -v "https://api.groupdocs.cloud/v1.0/merger/pages/orientation" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer [JWT Token]" \
-d "{
  "FileInfo": {
    "FilePath": "Doc_1.xlsx" 
  },
  "OutputPath": "Doc_1_landscape.xlsx",
  "Mode": "Landscape",
  "StartPageNumber": 1,
  "EndPageNumber": 1
}"

Merge Excel Files into One File Online

curl -v "https://api.groupdocs.cloud/v1.0/merger/join" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt token>"
-d "{
    "JoinItems":
    [
        {
            "FileInfo":
            {
                "FilePath": "Doc_1_landscape.xlsx",
                "Password": "password"
            }
        },
        {
            "FileInfo":
            {
                "FilePath": "Doc_2.docx"
            }
        }
    ],
    "OutputPath": "Output/joined.pdf"
}"

Thank you.
So helpful.

1 Like