If FileUpload.HasFile Then
Dim FileNameXlsx = Path.ChangeExtension(Path.GetFileName(FileUpload.PostedFile.FileName), ".xlsx")
Dim pathOfUploadedCCP As String = Server.MapPath("~/Uploaded/Documents/TemporaryUploadedFileForCCP/") + FileNameXlsx
FileUpload.SaveAs(pathOfUploadedCCP)
This code only changes the extension but I am getting the error that the file is corrupted. Please help me: How do I change the format of files to excel workbook (.xlsx)?