Hello,
This is an expected behavior. Android's native Webview does not have the ability to parse documents. Therefore, you need to enable Javascript for the Android platform's Webview and implement the online preview function of Excel through the API provided by Microsoft.
Please refer to the following code sample:
public WebViewTest()
{
InitializeComponent();
#if ANDROID
Microsoft.Maui.Handlers.WebViewHandler.Mapper.AppendToMapping("MyCustomization", (handler, view) => {
handler.PlatformView.Settings.JavaScriptEnabled = true;
handler.PlatformView.Settings.AllowFileAccess = true;
handler.PlatformView.Settings.AllowFileAccessFromFileURLs = true;
handler.PlatformView.Settings.AllowUniversalAccessFromFileURLs = true;
});
TestWeb.Source = new Uri("https://view.officeapps.live.com/op/view.aspx?src=https://go.microsoft.com/fwlink/?LinkID=521962").ToString();
#endif
}
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.