Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. converting excel sheet to pdf in qt cpp
Forum Updated to NodeBB v4.3 + New Features

converting excel sheet to pdf in qt cpp

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 889 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harsha123
    wrote on 30 Dec 2021, 07:15 last edited by
    #1

    how to convert excel sheet to pdf using qt cpp

    J 1 Reply Last reply 30 Dec 2021, 08:24
    0
    • H harsha123
      30 Dec 2021, 07:15

      how to convert excel sheet to pdf using qt cpp

      J Offline
      J Offline
      JonB
      wrote on 30 Dec 2021, 08:24 last edited by
      #2

      @harsha123
      Hello and welcome.

      You need to provide more context about your environment and what exactly you want to achieve. For example, I see at least 3 high-level approcahes you may be starting from:

      1. You are running under Windows, and wish to use Automation to talk from your Qt app to a running Excel program to ask it to select the sheet and do the printing for you.

      2. You have a .xls/.xlsx saved file and want to read that in and print it. (And then you have the sub-issue of how much formatting you expect to be respected, e.g. column widths.)

      3. You have exported a .csv file and want to read that and print a table from it.

      1 Reply Last reply
      2
      • H Offline
        H Offline
        harsha123
        wrote on 30 Dec 2021, 09:22 last edited by
        #3

        I want to read .xlsx already existing file and convert to pdf file ,no need to print it just need to create only pdf file from that .xlsx file this i need to do in windows qt cpp .

        J 1 Reply Last reply 30 Dec 2021, 09:29
        0
        • H harsha123
          30 Dec 2021, 09:22

          I want to read .xlsx already existing file and convert to pdf file ,no need to print it just need to create only pdf file from that .xlsx file this i need to do in windows qt cpp .

          J Offline
          J Offline
          JonB
          wrote on 30 Dec 2021, 09:29 last edited by JonB
          #4

          @harsha123
          I do not think there is a C++ library for Qt which can read a .xlsx and understand enough about it to actually render/print/export to PDF. I think at best it can parse it. There may be a library for Python which can accomplish this, but not C++.

          I stand to be corrected by someone more knowledgeable, I may be mistaken.

          Maybe I am wrong. What about https://qtexcel.github.io/QXlsx/ ? I see it has

          Qt-Table-Printer is under BSD 3-Clause license. https://github.com/T0ny0/Qt-Table-Printer

          at https://github.com/T0ny0/Qt-Table-Printer. Maybe that can leveraged to produce PDF file (which is why I talked abour "printing" earlier, do print-to-PDF-file).

          1 Reply Last reply
          1
          • R Offline
            R Offline
            ricksharma
            wrote on 29 Nov 2024, 12:08 last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved