Tag: sharepoint

以编程方式将XLS转换为XLSB?

我有一个客户需要将XLS文件转换为XLSB。 有没有人以编程方式完成此任务(有或没有附加组件—无所谓 – 只需要能够自动化它)? 我正在寻找一种自动化方法。 作为旁注,客户正在询问这一点,因为他们使用Sharepoint,似乎它有一种方法来比XLS更快更容易地分析XLSB文件??? 我正在努力提高我的Sharepoint知识,但与此同时,我正试图找到这个XLSB问题的答案。 谢谢。

无法加载文件或程序集”或其依赖项之一

有什么帮助吗? 我只有一个图书馆,这让我发疯。 这是我收到的错误。 我没有使用任何其他依赖。 Could not load file or assembly ‘FOD.Intranet.Lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=039c1f3a4c719e82’ or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in […]

将另一种语言转换为PowerShell或使用powershell中的语言

我找到了这段代码 // “url” is the full destination path (including filename, ie https://mysite.sharepoint.com/Documents/Test.txt) // “cookie” is the CookieContainer generated from Wichtor’s code // “data” is the byte array containing the files contents (used a FileStream to load) System.Net.ServicePointManager.Expect100Continue = false; HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest; request.Method = “PUT”; request.Accept = “*/*”; request.ContentType = “multipart/form-data; charset=utf-8”; […]

如何在Sharepoint中查找登录用户?

我开发了一个必须部署在Sharepoint服务器上的“Web部件”。 我需要用户的用户名,该用户已登录Web部件中的sharepoint服务器。 我如何获得该用户名?

以编程方式在Sharepoint中实例化Web部件页面

有没有一种简单的方法可以使用对象模型或Web服务以编程方式将Web部件页面添加到Sharepoint站点? 以这种方式创建列表和添加Web部件似乎很简单,但我找不到如何创建内容页面的示例。 编辑:对于普通的WSS安装(不是MOSS)。

使用HTTP Web请求发送HTTP标头以进行NTLM身份validation

我想登录到一个Sharepoint门户,它会显示一个登录对话框,但是正在使用NTLM身份validation。 如何修改C#中的HTTP标头以成功登录请求? 我假设我需要对门户网站登录部分中的页面进行HTTPWebRequest,并将HTTP标头集合与此一起发布?

不使用文件系统在C#中进行序列化

我有一个简单的2D字符串数组,我想将它填入MOSS中的SPFieldMultiLineText。 这映射到ntext数据库字段。 我知道我可以序列化为XML并存储到文件系统,但我想在不触及文件系统的情况下进行序列化。 public override void ItemAdding(SPItemEventProperties properties) { // build the array List<List> matrix = new List<List>(); /* * populating the array is snipped, works fine */ // now stick this matrix into the field in my list item properties.AfterProperties[“myNoteField”] = matrix; // throws an error } 看起来我应该可以这样做: XmlSerializer s = new XmlSerializer(typeof(List<List>)); properties.AfterProperties[“myNoteField”] […]

如何将凭据传递给httpwebrequest以访问SharePoint库

我正在尝试使用HttpWebRequest从SharePoint文档库中读取文件。 为了做到这一点,我必须传递一些凭据。 我正在使用以下请求: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = “GET”; request.ContentType = “application/msexcel”; request.UserAgent = “Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0”; request.Credentials = new NetworkCredential(UserName, PassWord); 这是传递凭据的正确方法吗?

字段或属性\“ListItemAllFields \”不存在exception

下面的代码归功于Vadim Gremyachev。 我的目标是使用CSOM授予用户对某些SharePoint文件夹的访问权限。 我试图实现的目标是访问名为JZhu的库,在JZhu库中,我有两个文件夹folder1和folder2 。 我正在尝试向folder1授予Reader权限。 到目前为止代码没有工作,因为我在第6行得到例外说: 字段或属性\“ListItemAllFields \”不存在 ClientContext context = new ClientContext(“http://myRealUrl”); Principal user = context.Web.EnsureUser(@”myLoginAccout”); var folder = context.Web.GetFolderByServerRelativeUrl(“JZhu/folder1”); var roleDefinition = context.Site.RootWeb.RoleDefinitions.GetByType(RoleType.Reader); //get Reader role var roleBindings = new RoleDefinitionBindingCollection(context) { roleDefinition }; folder.ListItemAllFields.BreakRoleInheritance(true, false); //line 6 folder.ListItemAllFields.RoleAssignments.Add(user, roleBindings); context.ExecuteQuery();

在WPF中使用BackgroundWorker更新UI

我目前正在编写一个简单的WPF 3.5应用程序,该应用程序利用SharePoint COM调用SharePoint站点并生成组和用户信息。 由于此过程需要一段时间,因此我希望在生成组时显示ProgressBar。 期望的过程如下: 用户输入url并单击按钮以获取站点数据。 ProgressBar开始动画 生成组并将名称添加到ListView 完成后,ProgressBar动画结束 我遇到的问题是UI永远不会更新。 ProgressBar或ListView都不做任何更改。 如果有人有任何想法来帮助下面的代码,将不胜感激。 private void GetGroupsAndUsersButton_Click(object sender, RoutedEventArgs e) { siteUrl = “”; if (SiteURLTextBox.Text.Length > 0) { FetchDataProgressBar.IsIndeterminate = true; mWorker = new BackgroundWorker(); mWorker.DoWork += new DoWorkEventHandler(worker_DoWork); mWorker.WorkerSupportsCancellation = true; mWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); mWorker.RunWorkerAsync(); } else { System.Windows.MessageBox.Show(“Please enter a URL for the […]