B4J Library jExcel library

A more powerful library is now available: https://www.b4x.com/android/forum/t...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.

SS-2013-11-26_14.37.34.png


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

It depends on jxl.jar: www.b4x.com/b4j/files/jxl.jar
 

Attachments

  • ExcelExample.zip
    2.4 KB · Views: 2,827
  • jExcel.zip
    15.9 KB · Views: 3,524
Last edited:

marco.canta

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

Thanks
 

MaFu

Well-Known Member
Licensed User
Longtime User

Theera

Well-Known Member
Licensed User
Longtime User
In B4J still use jxl.jar file as same as in B4A,doesn't it?
 

ciprian

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

Molchyn

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

rboeck

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

Roycefer

Well-Known Member
Licensed User
Longtime User
The jFileWatcher library allows you to get and set the read-only status of files.
 

rboeck

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

ikkow

New Member
Licensed User
Longtime 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.
 

BarryW

Active Member
Licensed User
Longtime User
A more powerful library is now available: https://www.b4x.com/android/forum/t...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.

SS-2013-11-26_14.37.34.png


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/

Can we get the image on excel cell?
 
Top