Ending and deleting files in Excel

xiaoxiao2021-03-06  111

// Path // Represents / String Path = "..// ftp //";

/ / Return to the file name and upload the file

String xlsname = conn.upfile (path, xls, page) .tostring ();

// The detection end is not an Excel file string a = "."; Char [] de = a.tochararray (); string xlsxing = xlsname.split (de, 2) [1] .tostring (); if (xlsxing.toupper ()! = "XLS") {response.redirect ("Sellmes.aspx? Msg = 111"); response.end ();}

// Upload entlread (xlsname); // Remove file // create a reference to a file. Fileinfo fi = new fileInfo (server.mappath (path xlsname)); fi.delete (); response.redirect (" SELLMES.ASPX? MSG = 25 ");

转载请注明原文地址:https://www.9cbs.com/read-100595.html

New Post(0)