Ramco Ramco

Ramco Ramco

  • 441
  • 3.4k
  • 521k

Rename .xml file to .xls

Apr 13 2023 7:31 AM

Hi

  I have below code . I want if file has file extendsion .xml then first it should be saved as .xls with same name

string FolderPath = "~/Upload/ExcelUpload/";
                    string FilePath = Server.MapPath(FolderPath + RandomName + FileName);

                    FileUpload1.SaveAs(FilePath);

Thanks


Answers (6)