CSV viewer: an application using the scroll grid explained in a previous tutorial.

PaulMeuris

Active Member
Licensed User
In this B4J application you can load and view CSV text files.
A CSV file is a Comma-Separated Values text file.
Each value from one line is separated by a delimiter.
This delimiter can be a comma ( , ), a semi-colon ( ; ), an equal-sign ( = ), a colon ( : ), a tab character or any other character you choose as a delimiter.
The first line in the file usually contains the header texts for each value.
It is also allowed to set the delimiter in the first line (for instance: sep=; ). The second line then contains the header texts.
1667133084315.png

You can import a CSV-file with the CSV-button. In the Windows Open Dialog you can choose a file to be imported in the import folder.
The imported files combo box then has a reference to the imported file. Selecting it will open the list.
The JSON export button allows you to export the list in a JSON format. The exported file contains an array of arrays.
The exported CSV file contains in the first line the separator (delimiter) indication that was used in the list.
When you open that exported CSV file with Excel then Excel will use that indication.
With the HTML button you can have a HTML list in a WebView. With the combination CRTL-key and mouse wheel you can zoom in or out.
In the search text field you can type any search text. The more characters you type the more precise the search result will be.
The search is case-insensitive. Any combination of upper or lower case letters can be used.
A search list is presented after each search in the normal view or in the WebView.
Clicking on a row number or a row in the list will show the information dialog with all the details for that row.

Tip: clicking 3 times on a hyperlink will select that link and you can then copy and paste it in a browser address bar.

Note: you need to remove the top 5 rows from the B4XGoodies list if you want to use it in this application. Search the forum for that list!

Happy studying!
(there are more than 6400 rows of goodies to explore).
You will find the source code in the attached file.
 

Attachments

  • csv_viewer.zip
    17.1 KB · Views: 212

PaulMeuris

Active Member
Licensed User
You can find the scrolling grid tutorial via this link: Scrolling grid
Indeed, it is a useful tool.
I have also made a SQLite DB viewer tool using this grid but i didn't publish it because it's almost the same as the Database Manager tool from a previous tutorial.
Thank you for the kind words.
 
Top