B4J Question Write in Microsoft Word ... doesn't work! ... why?

Discussion in 'B4J Questions' started by JOTHA, May 16, 2019.

  1. JOTHA

    JOTHA Well-Known Member Licensed User

    Hi forum,

    I've tried to start the solution from Erel https://www.b4x.com/android/forum/threads/write-in-microsoft-word.59328/#post-373767 but it doesn't work.

    Logfile:
    The error apears at "SaveDocument".
    It generates a DOCX-File (see attachment), but it has 0 kB.

    Do I need MS-WORD have installed or can I do this with LibreOffice also?
     

    Attached Files:

    • TEST.zip
      File size:
      152 bytes
      Views:
      34
  2. Erel

    Erel Administrator Staff Member Licensed User

    No.

    Please upload the project.
     
  3. JOTHA

    JOTHA Well-Known Member Licensed User

    THX Erel,
    here is the project.
     

    Attached Files:

  4. Erel

    Erel Administrator Staff Member Licensed User

    Works fine here. Which version of B4J are you using? Which version of Java? Debug or release modes?
     
  5. JOTHA

    JOTHA Well-Known Member Licensed User

    • B4J-Version: 7.32
    • Java: jdk1.8.0_192
    • Windows10
    Release-Mode tested with error
    Debug-Mode stops at:
    Code:
    doc.RunMethod("write"Array(out))
     
  6. Erel

    Erel Administrator Staff Member Licensed User

  7. JOTHA

    JOTHA Well-Known Member Licensed User

    I made a download again of the Library-Files and the PoiExcelExample too.
    I copied them into the Library-Directory of B4J ... but it really doesn't work!

    The PoiExcelExample alos doesn't work, see LOG-file:
    :(

    Now i'm installing the newer jdk-8u212-windows-x64 in C:\Java ... maybe that is the reason ... --> NO! --> this didn't help!

    In the protocol there is a message (see picture),
    means "Lib not in use!" Protocol-Warning.png
     
    Last edited: May 19, 2019
  8. JOTHA

    JOTHA Well-Known Member Licensed User

    I have now installed B4J on another PC and there are the same problems.
    The LOG-File in Debug-Mode gives more information:
    Maybe the problem is caused by downloading the additional jar-files which are needed:
    1. commons-collections4-4.1.jar
    2. commons-compress-1.18.jar
    3. commons-math3-3.6.1.jar
    4. poi-4.0.0.jar
    5. poi-ooxml-4.0.0.jar
    6. poi-ooxml-schemas-4.0.0.jar
    7. poi-scratchpad-3.12-20150511.jar
    8. xbean.jar
    Do I have to copy also some XML-Files to the Library-folder?
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Only jPOI.xml.

    Try the attached project.
     

    Attached Files:

    • 1.zip
      File size:
      1 KB
      Views:
      12
  10. JOTHA

    JOTHA Well-Known Member Licensed User

    THX Erel,

    i tried the attached project ... the same problem again :(
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    Please post the stack trace.
     
  12. JOTHA

    JOTHA Well-Known Member Licensed User

    How can i get this?
    ... or do you mean the LOG-file (Protokoll / protocol)?

    I found he code for showing the Stack Trace:
     
    Last edited: May 20, 2019
  13. Erel

    Erel Administrator Staff Member Licensed User

  14. JOTHA

    JOTHA Well-Known Member Licensed User

    ... seems working ...
    1.jar.png
     
  15. Erel

    Erel Administrator Staff Member Licensed User

  16. JOTHA

    JOTHA Well-Known Member Licensed User

    THX Erel,

    i had a look in the PC an there was the "DOCUMENT.DOCX" as expected ... it works!
    Later I'll do as you told me ...
    Thank you very much!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice