Ramco Ramco

Ramco Ramco

  • 424
  • 3.5k
  • 576.5k

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)