惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - zz

关于c# 静态构造函数的说明 后绑定webservice, 下帖引用自他人 通过citrix client 打印label 标签 如何用正确的方法来写出质量好的软件的体会 [转帖]满分的项目管理 转载 -- Visual Basic.Net中的文件操作 一位买车高手的经验谈 绝对有收藏价值 [转贴 2007-03-27 11:16:10 ] 发表者: 不要复杂 转摘-ComponentArt WebUI3.0控件的使用方法 在德国买手表 我的电脑,我的文件夹都打不开了? 名言哪! sql 常用命令 how to show a dialog box that prompts you to either "Open it" or "Save it to disk"again? sps List中根据利用Today和birth字段,计算用户年龄 用户怎么无法登陆sps网站了? 再asp.net中实现sharepoint里面调用outlook address book的功能 滚动显示sps站点中某个列表里面的内容的 webpart 我碰到的到现在为止,还没有找到比较好的解决方法的sps问题 download latest 20 SharePoint Portal Site theme
转贴 - Dflying Chen @ joycode 微软公司昨天发布的三个与Office System 2007相关的软件和参考文档
zz · 2006-11-30 · via 博客园 - zz

微软公司昨天发布的三个与Office System 2007相关的软件和参考文档

随着Office System 2007的发布,微软公司的新一代企业业务平台变得前所未有的强大。Office相关开发也正逐渐变得炙手可热。为了帮助开发者更好地了解并基于Office System 2007进行开发,微软公司将发布一系列有关Office System 2007的参考文档以及相关辅助软件。

昨天微软公司就发布了如下三个与Office System 2007相关的软件和参考文档:

[1] 2007 Office System Document: Compliance Features in the 2007 Microsoft Office System

下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyID=d64dfb49-aa29-4a4b-8f5a-32c922e850ca&DisplayLang=en

这篇洋洋洒洒的67页的文档全面介绍了Office System 2007的适应性以及扩展性能力。每一个应用了Office System 2007的企业都将会有它自己的个性化、需要定制的需求。这份文档就将告诉我们Office System 2007开发者什么样的需求是能够实现的,应该怎样实现等相关内容。文档份为如下几大部分:

  1. Introduction
  2. An Overview of Regulatory Compliance
  3. The 2007 Microsoft Office System Products
  4. Compliance Capabilities in the 2007 Microsoft Office System
  5. Compliance Extensibility Opportunities
  6. Development Tools for Extending Office and Windows SharePoint Services
  7. Summary
  8. Appendix I: Resources
  9. Appendix II: References

如果你打算定制出一套自己的Office System 2007系统,那么这份文档绝对不容错过。

[2] 2007 Office System Document: Lists of Control IDs

下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyID=4329d9e9-4d11-46a5-898d-23e4f331e9ae&DisplayLang=en

Office System 2007的UI中引入了一个新东西——Ribbon。虽然对于这个Ribbon,使用者仁者见仁,众说纷纭,不过作为开发者,我们还是有必要赶上发展的脚步。Ribbon这个东西相关的开发也设计得独具匠心,具体内容就不详细说了,有兴趣的朋友可以先参考一下这篇MSDN文档:Customizing the Office (2007) Ribbon User Interface for Developers (Part 1 of 3) 。

微软公司发布的这个软件其实是一个自解压的压缩文件,解压后将得到24个Excel文件,其中分别列出了Office System 2007系列软件中使用的内建Ribbon的ID,方便我们开发时参考。

下图就显示了Word中内建的部分Ribbon的ID:

[3] 2007 Office System Sample: Open XML File Format Code Snippets for Visual Studio 2005

下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyID=8d46c01f-e3f6-4069-869d-90b8b096b556&DisplayLang=en

不得不承认,随着Office System 2007的发布,Office开发变得更加简化,提供的API也更加丰富。不过由于Office System 2007本身的复杂性,对于初学者来说,掌握Office System 2007开发仍旧不是一件容易的事情。甚至对于一些最常用功能的实现都无所适从。

微软公司发布的这个Visual Studio 2005的Code Snippets集合就提供了一系列关于Office System 2007开发中经常用到的功能的代码片断。关于Visual Studio 2005的Code Snippets,其实就是一系列常用的代码片断,可以看作是一种代码级别的复用。这里不再多谈Code Snippets,如果你还不是很了解这个强大功能,请参考这篇MSDN文章:How to: Manage Code Snippets

下面就是在Visual Studio 2005中使用该Code Snippets时的界面:

如上图所示,选择了“Excel: Get sheet info”之后,Code Snippets将自动插入如下一大段代码:

public struct SheetInfo
{
    public string SheetName;
    public string SheetType;
 
    public SheetInfo(string SheetName, string SheetType)
    {
        this.SheetName = SheetName;
        this.SheetType = SheetType;
    }
}
 
public List<SheetInfo> XLGetSheetInfo(string fileName)
{
    //  Return a generic list containing info about all the sheets.        
    const string documentRelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
 
    //  Fill this collection with a list of all the sheets
    List<SheetInfo> sheets = new List<SheetInfo>();
 
    using (Package xlPackage = Package.Open(fileName, FileMode.Open, FileAccess.Read))
    {
        //  Get the main document part (workbook.xml).
        foreach (System.IO.Packaging.PackageRelationship relationship in xlPackage.GetRelationshipsByType(documentRelationshipType))
        {
            //  There should only be one document part in the package. 
            Uri documentUri = PackUriHelper.ResolvePartUri(new Uri("/", UriKind.Relative), relationship.TargetUri);
            PackagePart documentPart = xlPackage.GetPart(documentUri);
 
            //  Load the contents of the workbook, which is all you 
            //  need to retrieve the names and types of the sheets:
            XmlDocument doc = new XmlDocument();
            doc.Load(documentPart.GetStream());
 
            //  Create a NamespaceManager to handle the default namespace, 
            //  and create a prefix for the default namespace:
            XmlNamespaceManager nsManager = new XmlNamespaceManager(doc.NameTable);
            nsManager.AddNamespace("default", doc.DocumentElement.NamespaceURI);
 
            //  Loop through all the nodes, retrieving the information
            //  about each sheet:
            foreach (System.Xml.XmlNode node in doc.SelectNodes("//default:sheets/default:sheet", nsManager))
            {
                string sheetName = string.Empty;
                string sheetType = "worksheet";
 
                sheetName = node.Attributes["name"].Value;
                XmlAttribute typeAttr = node.Attributes["type"];
                if (typeAttr != null)
                {
                    sheetType = typeAttr.Value;
                }
                sheets.Add(new SheetInfo(sheetName, sheetType));
            }
 
            //  There's only one document part.
            break;
        }
    }
    return sheets;
}

我们既可以直接使用这些已经生成好了的功能,也可以通过查看代码了解、学习Office System 2007的常用操作,简直爽呆了!