I’m using Expo Document Picker to pick and read Excel file and trying to get that data saved in AsyncStorage. The file is being picked from the mobile’s local memory but I’m facing the below-mentioned error:
[Unhandled promise rejection: Error: Argument of an incompatible class: class java.util.HashMap cannot be passed as an argument to parameter expecting class java.lang.String.]
Here is the code:
const importDataFromFile = async () => {
let dataFromFile = [];
try {
let result = await DocumentPicker.getDocumentAsync({});
console.log(result.uri);
console.log(result);
console.log('File Picked');
let fileData = FileSystem.readAsStringAsync(result);
console.log('data assigned')
console.log (fileData);
}
}