Read CSV Resource File: Android Programming @DrBFraser
Read CSV Resource File: Android Programming  @DrBFraser
Uploaded February 2017 | Updated November 2026, 3 hours ago
Import a CSV file into an Android Application from the raw resource folder and store the contents in custom data objects for use in Java.

Steps:
1. Have data in a spread sheet. Clean out ','s from the data, then save as CSV file.

2. In Android project, create new resource directory
- type raw: gives name "raw"
- copy in file w/ copy/paste

3. Write code to read it.
- access the file via getResources().openRawResource(R.raw.vehicles_simple);
- use a BufferedReader to read one line at a time.
- call String.split() on the full line to create string tokens.
- parse the strings as needed and store in custom data objects.
- handle incorrectly formatted or missing data.
Read CSV Resource File: Android ProgrammingCreating a Pie Graph: Android ProgrammingGSON: LocalDate AdapterGraphical Cross Debugging in Eclipse: Embedded LinuxGoogle Maps API: Android ProgrammingGit Clone in Android Studio: Android ProgrammingDownload XML from a Web Server: Android ProgrammingCross Debugging with GDB: Embedded LinuxFork and Exec Linux ProgrammingCustom Options/Settings Activity: Android ProgrammingLinux Exec System CallDebugging in Android Studio: Android Programming
Brian Fraser |

Read CSV Resource File: Android Programming

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER