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. Disabling "SaveAs / Print" in Excel
Forum Updated to NodeBB v4.3 + New Features

Disabling "SaveAs / Print" in Excel

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.9k 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.
  • N Offline
    N Offline
    nikit
    wrote on last edited by
    #1

    Hi,
    I can open an Excel file in Qt. Below is the code :
    QAxWidget excel("Excel.Application");
    excel.setProperty("Visible", true );
    QAxObject * workbooks = excel.querySubObject("WorkBooks");
    QAxObject *workbook = workbooks->querySubObject( "Open(const QString&)", QString("G:\Book1.xlsx"));

    Is there any command where I can disable "Save As" or "Print". I don't want user to save or print his excel doc after he has edited.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Is this Book1.xlsx a sheet you create yourself?
      It possible to use macro to disable print and save.

      N 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        Is this Book1.xlsx a sheet you create yourself?
        It possible to use macro to disable print and save.

        N Offline
        N Offline
        nikit
        wrote on last edited by
        #3

        @mrjj :
        I can create myself and can open the excel.exe also.
        Which macro to use so that I wont allow user to SaveAs and Print his document?

        mrjjM 1 Reply Last reply
        0
        • N nikit

          @mrjj :
          I can create myself and can open the excel.exe also.
          Which macro to use so that I wont allow user to SaveAs and Print his document?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @nikit
          Just google it
          http://www.techrepublic.com/blog/microsoft-office/how-to-keep-others-from-printing-an-excel-worksheet/
          http://stackoverflow.com/questions/12264572/how-to-disable-save-and-save-as-using-vba

          1 Reply Last reply
          1

          • Login

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