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. Editing a spreadsheet
QtWS25 Last Chance

Editing a spreadsheet

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 3 Posters 4.5k Views
  • 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.
  • VRoninV VRonin

    For xlsx files you can try using QtXlsxWriter. it might loose some of the contents of the file if it's very complex so I'd give it a test run.

    ZoptuneZ Offline
    ZoptuneZ Offline
    Zoptune
    wrote on last edited by
    #6

    Hi @VRonin and thanks for the reply,

    I don't know how to install module on Qt, can you explain me how to do it ?

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #7

      The homepage, under "Getting started" has quite clear instructions

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • ZoptuneZ Offline
        ZoptuneZ Offline
        Zoptune
        wrote on last edited by Zoptune
        #8

        Yep my bad,

        But when i include the .pri file i get compiling error about a QVectorQZipReader::FileInfo in the ZipReader::init function

        VRoninV 1 Reply Last reply
        0
        • ZoptuneZ Zoptune

          Yep my bad,

          But when i include the .pri file i get compiling error about a QVectorQZipReader::FileInfo in the ZipReader::init function

          VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #9

          @Zoptune The original author is not maintaining the project anymore and his/her version is now broken on Qt 5.6. I'm keeping it working in my fork https://github.com/VSRonin/QtXlsxWriter

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          ZoptuneZ 1 Reply Last reply
          1
          • ZoptuneZ Offline
            ZoptuneZ Offline
            Zoptune
            wrote on last edited by
            #10

            Perfect ! Thank you very much for your work :)

            1 Reply Last reply
            0
            • VRoninV VRonin

              @Zoptune The original author is not maintaining the project anymore and his/her version is now broken on Qt 5.6. I'm keeping it working in my fork https://github.com/VSRonin/QtXlsxWriter

              ZoptuneZ Offline
              ZoptuneZ Offline
              Zoptune
              wrote on last edited by
              #11

              Hi again @VRonin ,

              How, do you think, can i print my xlsx doc after editing ?

              Thx

              VRoninV 1 Reply Last reply
              0
              • ZoptuneZ Zoptune

                Hi again @VRonin ,

                How, do you think, can i print my xlsx doc after editing ?

                Thx

                VRoninV Offline
                VRoninV Offline
                VRonin
                wrote on last edited by
                #12

                @Zoptune The library has no rendering functionality i.e. has no tool to "paint" the excel document, just to edit its parts. If you have excel installed on the machine that should print the file you can try this solution and use QProcess in your program to launch the WScript.exe

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                ZoptuneZ 1 Reply Last reply
                2
                • VRoninV VRonin

                  @Zoptune The library has no rendering functionality i.e. has no tool to "paint" the excel document, just to edit its parts. If you have excel installed on the machine that should print the file you can try this solution and use QProcess in your program to launch the WScript.exe

                  ZoptuneZ Offline
                  ZoptuneZ Offline
                  Zoptune
                  wrote on last edited by
                  #13

                  @VRonin Yep, this is solution i have seen yesterday, but i don't want to have Excel installed so i use a QProcess that launch LibreOffice to do a convertion in a pdf file and then print the pdf from my app.
                  I'm trying to find if it is possible with QtXlsx to change the document orientation (i need it to be in landscape format).

                  Thx

                  1 Reply Last reply
                  0
                  • VRoninV Offline
                    VRoninV Offline
                    VRonin
                    wrote on last edited by
                    #14

                    There is a pull request on the main project that implements the feature. The author did not submit it to my fork so I did not review and merged it yet but feel free to try it

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    ZoptuneZ 1 Reply Last reply
                    1
                    • VRoninV VRonin

                      There is a pull request on the main project that implements the feature. The author did not submit it to my fork so I did not review and merged it yet but feel free to try it

                      ZoptuneZ Offline
                      ZoptuneZ Offline
                      Zoptune
                      wrote on last edited by Zoptune
                      #15

                      @VRonin Sorry but i never used git,

                      Can u explain me how to do ?

                      Thx

                      EDIT : tried but doesn't work, the output file is corrupted

                      EDIT 2 : It's working now :)

                      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