Discussions

Expand all | Collapse all

read word document inside the QB

  • 1.  read word document inside the QB

    Posted 08-25-2020 05:29
    Hi All,

    i am trying to read the word  document  inside the quickbase but i am getting issue.

    what i am trying to do.

    1.   get the ticket from the API_Authenticate 
    2. pass the ticket in to Do_query API to get the document URL where  attached my word document.  
    3. but i m trying to read it it giving me all sign in page HTML and CSS.

    I am able to read the word document from my local but unable to read it  from Quickbase.


    Thanks

    ------------------------------
    preeti verma
    ------------------------------


  • 2.  RE: read word document inside the QB

    Posted 08-25-2020 12:57
    What is the ultimate goal here? You want to load the word document in your web browser and view it like that? 

    When using the requests module it will send you back the raw HTML like you are seeing. You are running it in something like Google Collab? You are running a DoQuery and then seeing the results of that printed out. If you do the same DoQuery via a URL manually you would see the same thing in your browser. That is a success message telling you that everything worked. However it is not doing what you expect it to.

    If you want to load a file you need to figure out the link first and then do the same GET request but for the exact file you want and that should return the raw file to you, so all the text.


  • 3.  RE: read word document inside the QB

    Posted 08-26-2020 00:03
    My goal here  is to get the track changes record ( means to get the new inserted text and deleted text  from the word document) . i am able to capture the changes when i get the document from the local but when i read the document using python from QB then its returning the raw HTML.



    i am able to get the record data with the document URL.
    when i read the document using below code its giving me raw HTML.

    wordfile=urlopen("document URL ").read()

    Thanks


    ------------------------------
    preeti verma
    ------------------------------



  • 4.  RE: read word document inside the QB

    Posted 08-26-2020 18:15
    I will try and look into this more tomorrow. I was getting similar results as you when testing against my own docx file hosted in Quick Base. Seeing the HTML and honestly it feels like it is not authenticated properly. It should be possible to visit the URL and get the file back in some form. I know docx can be annoying to deal with though.


  • 5.  RE: read word document inside the QB

    Posted 08-27-2020 11:38
    Sure Austin.

    Sent from my iPhone