B4J Library [B4XPages][XLUtils]A small class to view many-columned B4XTables - for example Excel sheets.

This is too small for a 'creation' and probably too large for a code snippet (about 100 lines of code).
Edit, now more like 250 lines. However, I think it might be useful for some members.

'tableSection' is a small B4XPages class. Each instance of this class is a section of a many-columned B4XTable.
The sections behave as independent tables, but are synchronised by row. The arrows at the bottom move right and left from section to section.

I have provided a zip file with an example that uses the Beta version of XLUtils (still in development) to read an Excel sheet.
The example depends on the same things as XLUtils. As you will see the new XL initiative is a very useful tool.


Since each section is just a B4XTable, you can easily implement editing and selection if needed.
However, it will take some extra work to get the row selection to span multiple sections.

Edit (Friday): fixed a bug in demo
 

Attachments

  • tableBrowser.zip
    57.8 KB · Views: 206
Last edited:

William Lancee

Well-Known Member
Licensed User
Longtime User
To keep sections synchronised, the original order of the dataset should be maintained.
I have added a way for letting the viewer sort and search, but then clearing these actions before navigating to another section.
#1 .zip file is updated
 

William Lancee

Well-Known Member
Licensed User
Longtime User
I have added multiple selections of cells, columns and rows applied globally to all table segments.
I have also added a toolkit handler that can act on those selections. The demo includes an example of a data summary tool.
Because this class is intended for large/wide Excel sheets, XLUtils and jPoi, I optimized the selection for B4J.
"Ctrl" key plus click for Column selection and the "Alt" key plus click for row selection.
To get a statistical description of a numeric column, navigate to the column, Ctrl click on cell, Click tool icon, select Summarize Data.

#1 .zip file is updated.

That's it for now. If I add anything more I will make the class a cross platform library.
 
Top