0

I have a VB.Net windows forms application which is working fine in windows 7 environment.

Now, I want to upgrade to windows 10. So I have started to test my application in windows 10 server machine.

I am getting an Exception (Exception from HRESULT:0X800A03EC) while saving a dynamically generated file in one of the folders on server.

I have identified the issue is not with the permissions.

'getting exception at this line of code.
xlApp.Workbooks(1).SaveAs(filename , xl.XlFileFormat.xlHtml)

Code for reference:

Private Sub VierwInBrowser(ByVal xlApp As xl.Application)
    Dim fileName As String = String.Format("{0}\{1}", "C:\Data", GetUniqueFileName())
Try
    xlApp.Workbooks(1).SaveAs(fileName, xl.XlFileFormat.xlHtml)
Catch ex as Exception
Messagebox.Show(ex.Message)
End Try
    xlApp.Quit()
    xlApp = Nothing
    GC.Collect()
    browser.Visible = True
    browser.Navigate(fileName)
    browser.BringToFront()
End Sub

1 Answers1

0

I have identified that the issue is with converting the excel sheet to html page in windows 10.

For this I have found a solution at https://support.microsoft.com/en-in/help/922850/error-message-in-office-when-a-file-is-blocked-by-registry-policy-sett