Note: I am not an app developer and if what I am about to say doesn't make sense, please guide me.
I have developed a cross-platform (Windows and Android) app using .NET MAUI Blazor. Previously, I used TableToExcel.js
library to save files in a Blazor WASM app.
I am using the same code and library in my current MAUI Blazor app.
The problem is that it worked fine for the Windows app but doesn't do anything on Android.
function exportReportToExcel(id, fileName, columns = null) {
fileName += ".xlsx";
let table = document.getElementById(id);
TableToExcel.convert(table, {
name: fileName,
sheet: {
name: 'Sheet 1'
}
});
}
I am calling this method using JSInterop
and it downloads a file in Windows but not on Android.
Confession: before trying this I have an idea that it won't work as the browser and (desktop or android) apps are completely different, but I thought to give it a try when I first tried it on the windows app and it worked so I was hoping that it might work on android as well but unfortunately.
Note: if I publish the same code as blazor WASM same code works, but not working for MAUI android app.