B4J Library jExcel library

Discussion in 'B4J Libraries & Classes' started by Erel, Nov 26, 2013.

  1. Erel

    Erel Administrator Staff Member Licensed User

    A more powerful library is now available: http://www.b4x.com/android/forum/threads/jpoi-supports-microsoft-excel-xls-and-xlsx-workbooks.57392/

    This library allows you to read and write XLS files. It is similar to B4A Excel library: http://www.basic4ppc.com/android/forum/threads/read-write-excel-files-on-android.25632/#content

    You should follow the steps in the above link to download and copy the native library.


    There are two new methods in this library:

    ReadableWorkbook.InitializeAsync - Asynchronously opens the file. The Ready event is raised when the workbook is ready.

    Sheet.GetAllAsync - Asynchronously gets all the cells from the sheet. The ValuesAvailable event is raised when the operation completee.

    [​IMG]

    The attached example allows you to open a workbook file and browse its content.

    Version 1.00 Beta 5+ is required: http://www.basic4ppc.com/android/forum/threads/b4j-beta-is-available.34617/
     

    Attached Files:

    Last edited: Aug 19, 2015
    Don Oso, jsanchezc and KitCarlson like this.
  2. ciprian

    ciprian Active Member Licensed User

    can we parse this file or use cells as strings?
     
  3. marco.canta

    marco.canta Active Member Licensed User

    I Have a error ...
    "Compiling generated Java code. Error"
    "Cannot find: C:\Programmi\Anywhere Software\B4J\libraries\jxl.jar"

    Thanks
     
  4. MaFu

    MaFu Well-Known Member Licensed User

  5. Theera

    Theera Well-Known Member Licensed User

    In B4J still use jxl.jar file as same as in B4A,doesn't it?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Yes.
     
  7. ciprian

    ciprian Active Member Licensed User

    Hi there. Someone can help me reading a .xml file, and writing all the data into a list, or a table.
    In fact i wish to parse the xml file and write an .txt file with the data from the xml file.
    Can you give a try please?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
     
  9. Molchyn

    Molchyn Member Licensed User

    Hi Erel,
    In this implementation Excel lib minimal readable from cell value = 0.001 ?
    if I have in table value like 0.000000001 Sheet.GetCellValue return 0?
     
  10. Erel

    Erel Administrator Staff Member Licensed User

  11. alienhunter

    alienhunter Active Member Licensed User

    Hi ,
    • is there a event if the file has been written to the disk ? or how to catch this ?

    thanks
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    The file is saved to the disk when you call WritableWorkbook.Write.
     
  13. hibrid0

    hibrid0 Active Member Licensed User

    Erel can I use this library in B4A?
     
  14. rboeck

    rboeck Well-Known Member Licensed User

    Erel likes this.
  15. rboeck

    rboeck Well-Known Member Licensed User

    I have a problem with this library: i create a new excel file with my data, now i close the workbook and make a delay for 1500 msec,
    then i want to open it fx.showexternalDocument(...). It opens, but this file is writeprotected by user ''.
    How can i 'free' this excel file?
     
  16. Roycefer

    Roycefer Well-Known Member Licensed User

    The jFileWatcher library allows you to get and set the read-only status of files.
     
  17. rboeck

    rboeck Well-Known Member Licensed User

    Thanks for your help! I am sorry, i translated it not exactly - the file is in use by user '' - i checked it with jFilewatcher and the file itself is not write protected - i think the creations process does not free the file handles. If i open it in excel, i can it open write protected and save under another name.

    Now i tried the newer excel library - PoiExcel - and in this example the opening of the file is already in the demo included - so here it works. Maybe i have to transfer my code to the new library...
     
    Last edited: Nov 7, 2015
    hibrid0 likes this.
  18. ikkow

    ikkow New Member Licensed User

    Is it possible to read RTD data from excel?

    Example:
    formula= "=RTD("RTDserver";"";"DATA1";"DATA2")"

    my wish is to create a TIMER that read this value each 10 seconds

    is it possible?

    thanks.
     
  19. Erel

    Erel Administrator Staff Member Licensed User

    No. This library doesn't work with Excel application. It internally knows how to read and write Excel files.
     
  20. BarryW

    BarryW Active Member Licensed User

    Can we get the image on excel cell?
     
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