首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c# 二进制流转成excel解决方案

2013-04-20 
c# 二进制流转成excel我已经把excel转成已image存入数据库里,现在想通过数据库读出excel,已经得到了excel

c# 二进制流转成excel
我已经把excel转成已image存入数据库里,现在想通过数据库读出excel,已经得到了excel的byte,但是不知道如何得到excel 望高手指教
 string strSQL = "Select [bytes],[tablename] from flow where  tableid=1";
            SqlCommon sqlcomm = new SqlCommon();
            DataTable dt = sqlcomm.CreaDataSet(strSQL,null).Tables[0];
            BinaryFormatter deserializer = new BinaryFormatter();
            MemoryStream stream = new MemoryStream();

            byte[] objBytes = (byte[])dt.Rows[1]["bytes"];
以上是我从数据库中得到的excel的二进制流
[解决办法]
不是IO保存和写入么?

热点排行