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

JOTHA

Well-Known Member
Licensed User
Longtime 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?
 

Attachments

  • TEST.zip
    152 bytes · Views: 225

JOTHA

Well-Known Member
Licensed User
Longtime User
THX Erel,
here is the project.
 

Attachments

  • PoiWord.zip
    1.1 KB · Views: 237
Upvote 0

JOTHA

Well-Known Member
Licensed User
Longtime User
  • B4J-Version: 7.32
  • Java: jdk1.8.0_192
  • Windows10
Release-Mode tested with error
Debug-Mode stops at:
B4X:
doc.RunMethod("write", Array(out))
 
Upvote 0

JOTHA

Well-Known Member
Licensed User
Longtime 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!"
 
Last edited:
Upvote 0

JOTHA

Well-Known Member
Licensed User
Longtime 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?
 
Upvote 0

JOTHA

Well-Known Member
Licensed User
Longtime User
THX Erel,

i tried the attached project ... the same problem again
 
Upvote 0

JOTHA

Well-Known Member
Licensed User
Longtime User
Please post the stack trace.
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:
Upvote 0

JOTHA

Well-Known Member
Licensed User
Longtime 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 ...
Delete all relevant libraries, make sure that there are no old copies in the internal libraries folder and download them again

Thank you very much!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…