Sharepoint 列表中 附件文件获取
来源:互联网 发布:多客服源码 编辑:程序博客网 时间:2024/05/02 05:02
Sharepoint 列表中 附件文件获取
SPSite site=new SPSite(url);
SPWeb web=site.OpenWeb();
SPList olist = web.Lists["最新通知"];
SPList nlist= web.Lists["最新通知New"];
SPListItem nitem = null;
foreach (SPListItem oitem in olist.Items)
{
string title = oitem["标题"].ToString();
nitem = nlist.Items.Add(); //将附件内容存储到最新通知New中
nitem["标题"] = oitem["标题"];
nitem["正文"] = oitem["正文"];
if (oitem.Attachments != null)
{
SPAttachmentCollection attach = oitem.Attachments;
for (int i = 0; i < attach.Count; i++)
{
String url = attach.UrlPrefix + attach[i];
Console.WriteLine("正在下载{0}", url);
SPFile file = web.GetFile(url);
byte[] content = file.OpenBinary();
nitem.Attachments.Add(oitem.Attachments[i].ToString(), content);
}
}
nitem.Update();
}
- Sharepoint 列表中 附件文件获取
- Sharepoint 列表中 附件文件获取
- sharepoint 列表附件的基本操作
- C#获取SharePoint中列表的数据并进行修改
- [10月15日的脚本] 从Microsoft SharePoint Server 2010中获取签出文件列表
- 读取InfoPath中的附件并附加至SharePoint列表
- SharePoint 批量打包zip下载列表项ListItem附件
- sharepoint 中获取用户信息
- SharePoint中删除列表记录
- sharepoint中列表的使用
- python中如何获取文件列表
- sharepoint 2013 如何创建一个webservice获取sharepoint列表数据
- sharepoint: 如何获取页面上webpart列表
- sharepoint 2010 获取列表术语数据源方法
- SharePoint 2010 获取列表中所有数据(包括文件夹内)的方法
- SharePoint 2010 获取列表中所有数据(包括文件夹内)的方法
- SharePoint 上传附件代码
- SharePoint中显示附件(1),DataView显示附件的一个解决办法
- 用Gzip进行js的超强压缩 收藏
- EBS多OU和多帐套客户化总结
- 二进制长字符串转为大整数(16进制数)
- 应用OOP的设计过程演化(二)
- 从父页面读取和操作iframe中内容方法
- Sharepoint 列表中 附件文件获取
- 李开复:互联网的九个产品精神
- ERP仙境和企业家的眼泪 ----“ERP是否过时?”
- WindowsXP Ubuntu双系统安装实记
- 服务器网页缓存的深入分析
- Ubuntu10.10下嵌入式开发环境的配置
- linux下的解压缩命令
- Ubuntu10.10 下安装低版本GCC方法
- 几种通信加密的方法(Key Agreement Protocol, Digital Signatures, RSA from Blown to Bits)