1 将客户端获取到的文件转换为 文件流
 FileStream fsRead = Form.edit.File.OpenRead();
            int fsLen = (int)fsRead.Length;
            byte[] heByte = new byte[fsLen];
            int r = fsRead.Read(heByte, 0, heByte.Length);
2 将字节流 传输到 服务器
Convert.ToBase64String(heByte); // 客户端 将字节转换为字符串 传输到服务器
byte[] buffer = Convert.FromBase64String(obj["byteStr"].ToString()); //服务器将字符串 转换为 字节
3 将字节 转换为 要得 流 如 Stream 和 FileStream
 using (Stream stream = new MemoryStream(buffer))
                {
                    int index = obj["fileName"].ToString().LastIndexOf(‘.‘);
                    string fileExt = obj["fileName"].ToString().Substring(index, obj["fileName"].ToString().Length - index);
                    DataTable list = NPOIExcel.ExcelToTable(stream, fileExt);   // NPOI  读取execl的类库
                }   
原文:https://www.cnblogs.com/yyl001/p/12121024.html