Hi,
I cant able to save an excel file from VB.NET.
I used the code below:
SaveFileDialog1.Title = "Save Excel File"
SaveFileDialog1.Filter = "Excel files (*.xls)|*.xls|Excel Files (*.xlsx)|*.xslx"
SaveFileDialog1.ShowDialog()
If (SaveFileDialog1.FileName <> "") Then
xlWorksheet.SaveAs(SaveFileDialog1.FileName)
End If
Error occurred in the highlighted line as "Exception from HRESULT: 0x800401A8".
I cannot analyse the cause for this error. because in before case it works fine for the same code i used.
Can anyone help?:confused: