Very good @Kevinkun !!, I also had that idea, send the content of the file as a string and have xls.js convert it.
I think the problem is fetch(), check...
We have a text file abc.txt, through fetch(my_file) we introduce its content in the script and obtain its ASCII codes.
abc.txt and my_script.htm in asset.
abc.txt
one
two
three
abcdefghijklmnopqrstuvwxyz
1
2
3
my_script.htm
Running script.
<script>
my_file = AppInventor.getWebViewString(); // INPUT
// import my_file from '/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/abc_ASD.txt';
// my_file = 'file://storage/emulated/0/Android/data/edu.mit.appinventor.ai…