<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>openxml &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/openxml/</link>
	<description>Feed of posts on WordPress.com tagged "openxml"</description>
	<pubDate>Sat, 05 Dec 2009 06:27:49 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Data/View Separation in Word 2007 using Word XML Data Binding and OpenXML]]></title>
<link>http://lennilobel.wordpress.com/2009/11/20/dataview-separation-in-word-2007-using-word-xml-data-binding-and-openxml/</link>
<pubDate>Fri, 20 Nov 2009 14:34:12 +0000</pubDate>
<dc:creator>Leonard Lobel</dc:creator>
<guid>http://lennilobel.wordpress.com/2009/11/20/dataview-separation-in-word-2007-using-word-xml-data-binding-and-openxml/</guid>
<description><![CDATA[The OpenXML file format used by Microsoft Office 2007 enables programmatic document manipulation wit]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-19.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-18.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-17.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-16.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-15.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-14.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-13.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-12.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-11.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-10.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-09.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-08.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-07.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-06.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-05.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-04.png"></a><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-02.png"></a></p>
<p>The OpenXML file format used by Microsoft Office 2007 enables programmatic document manipulation without automating Word, so that Word does not need to be installed alongside your code, which is great for server applications. In this post, I&#8217;ll show you how to use OpenXML to implement bi-directional data binding between a Word document and XML data. <strong>This new feature in Word 2007 delivers the best data/view separation we&#8217;ve seen to date in Microsoft Office.</strong> And (for a LINQ junkie such as myself, anyway) the best part is that it works so nicely with LINQ to XML.</p>
<p>We&#8217;ll begin by creating a document with <em>content controls</em>. Then we&#8217;ll write a small amount of code to embed an XML file into the document and bind the content controls to various elements in the XML.</p>
<p>Before starting, you need to download the OpenXML SDK 2.0. Once the SDK is installed, you&#8217;ll have the assemblies you need to programmatically manipulate Office documents using the OpenXML API. You can download the SDK from here: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&#38;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&#38;displaylang=en</a></p>
<h3>Create the Document</h3>
<p>We&#8217;ll create a simple document with three content controls that will be bound to the following XML data:</p>
<pre class="brush: plain;">&#60;Customer&#62;
  &#60;Name&#62;John Doe&#60;/Name&#62;
  &#60;Expiration&#62;2/1/2010&#60;/Expiration&#62;
  &#60;AmountDue&#62;$129.50&#60;/AmountDue&#62;
&#60;/Customer&#62;</pre>
<p>Start a new document in Word 2007, and type the word Dear followed by a space. We now want to inject our first content control for the customer name. You can add content controls to your document from the Developer tab on the ribbon, but since that tab is hidden by default, you&#8217;ll need to show it first. Click the Office button and choose Word Options. Then check the &#8220;Show Developer tab in the Ribbon&#8221; checkbox and click OK.</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/01.png"></a></p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-01.png"><img class="alignnone size-full wp-image-508" title="WordBinding-01" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-01.png" alt="" width="546" height="275" /></a></p>
<p>With the cursor still positioned after the text &#8220;Dear &#8220;, click in the Developer tab to insert a new Text content control:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-02.png"><img title="WordBinding-02" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-02.png" alt="" width="546" height="228" /></a></p>
<p>We&#8217;ll be assigning tag names to identify content controls for data binding in our code. To view the tag names in Word as we setup the content controls, click the Design Mode button in the Developer tab:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-03.png"><img title="WordBinding-03" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-03.png" alt="" width="546" height="228" /></a></p>
<p>With the content control still selected, click Properties:</p>
<p> <a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-04.png"><img title="WordBinding-04" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-04.png" alt="" width="546" height="228" /></a></p>
<p>Set the Tag of the content control to <em>Customer/Name</em>, which is an XPath expression that refers to the &#60;Name&#62; element nested inside the &#60;Customer&#62; element of our XML data.</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-05.png"><img title="WordBinding-05" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-05.png" alt="" width="277" height="332" /></a></p>
<p>Click OK to close the dialog box. Notice how Word displays the tag name in the content control in Design Mode:</p>
<p> <a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-06.png"><img title="WordBinding-06" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-06.png" alt="" width="546" height="228" /></a></p>
<p>Continue adding text to the document, and insert two more content controls in a similar fashion for the expiration date and amount due fields. Use the same Text content control for the amount due field like we used for the customer name field, but use a Date Picker content control for the expiration date field:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-07.png"><img title="WordBinding-07" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-07.png" alt="" width="234" height="150" /></a></p>
<p>After setting the tag names of the additional content controls to the appropriate XPath expressions (Customer/Expiration and Customer/AmountDue), your document should look something like this:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-08.png"><img title="WordBinding-08" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-08.png" alt="" width="628" height="254" /></a></p>
<p>Turn off Design Mode to hide the tag names from the content controls:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-09.png"><img title="WordBinding-09" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-09.png" alt="" width="628" height="218" /></a></p>
<p>Save the document as <em>CustomerReminder.docx</em>. We have already established a separation of variable data and fixed document text, and could easily setup document protection at this point to allow manual data entry only for content controls. That&#8217;s cool all by itself, but we&#8217;re going to take this to the next level and implement automatic data binding between these content controls and a separate XML file. Although Word doesn&#8217;t care what values you assign to content control tags, we will now write code to find all tagged content controls, and treat those tags as XPath expressions that point to various XML elements in our XML data.</p>
<p>If you&#8217;re not already aware, all Office 2007 documents (including Word docx files) are actually compressed zip files (&#8220;packages&#8221;) that hold a collection of related XML &#8220;parts.&#8221; You can see this easily by simply appending <em>.zip</em> to the document filename and then opening it from Windows Explorer:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-10.png"><img title="WordBinding-10" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-10.png" alt="" width="628" height="280" /></a></p>
<p>After examining the contents of the document package, rename the filename extension back to &#8220;.docx.&#8221;</p>
<h3>Write the Code</h3>
<p>Start Visual Studio and create a new Windows Forms project. Now set references to the two assemblies you&#8217;ll need for OpenXML programming: <em>DocumentFormat.OpenXml</em> and <em>WindowsBase</em> (these can be found on the .NET tab of the Add Reference dialog box). The first assembly exposes the OpenXML object model for document manipulation, and the second assembly provides the support for embedding and extracting parts to and from the document package:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-11.png"><img title="WordBinding-11" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-11.png" alt="" width="297" height="389" /></a></p>
<p>Drop a button onto the form named <em>btnInit</em> and supply code for its <em>Click </em>event handler. You&#8217;ll also need a few additional <em>using</em> statements for importing some namespaces. The complete code listing below shows the required <em>using</em> statements and the <em>btnInit_Click</em> event handler.</p>
<pre class="brush: plain;">using System;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Linq;

using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;

namespace OpenXmlWordDataBinding
{
  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
    }

    private void btnInit_Click(object sender, EventArgs e)
    {
      var xml =
        new XElement(&#34;Customer&#34;,
          new XElement(&#34;Name&#34;, &#34;John Doe&#34;),
          new XElement(&#34;Expiration&#34;, &#34;2/1/2010&#34;),
          new XElement(&#34;AmountDue&#34;, &#34;$129.50&#34;));

      var docxFile = @&#34;..\..\CustomerReminder.docx&#34;;

      using (var wpd = WordprocessingDocument.Open(docxFile, true))
      {
        var mainPart = wpd.MainDocumentPart;
        var xmlPart = mainPart.AddNewPart&#60;CustomXmlPart&#62;();
        using (Stream partStream = xmlPart.GetStream(FileMode.Create, FileAccess.Write))
        {
          using (StreamWriter outputStream = new StreamWriter(partStream))
          {
            outputStream.Write(xml);
          }
        }

        var taggedContentControls =
          from sdt in mainPart.Document.Descendants&#60;SdtRun&#62;()
          let sdtPr = sdt.GetFirstChild&#60;SdtProperties&#62;()
          let tag = (sdtPr == null ? null : sdtPr.GetFirstChild&#60;Tag&#62;())
          where tag != null
          select new
          {
            SdtProps = sdtPr,
            TagName = tag.GetAttribute(&#34;val&#34;, &#34;http://schemas.openxmlformats.org/wordprocessingml/2006/main&#34;).Value
          };

        foreach (var taggedContentControl in taggedContentControls)
        {
          var binding = new DataBinding();
          binding.XPath = taggedContentControl.TagName;
          taggedContentControl.SdtProps.Append(binding);
        }

        mainPart.Document.Save();
      }
    }
  }
}</pre>
<p>Let&#8217;s analyze this code piece by piece. First, we construct the XML data as a graph of XML objects using <em>LINQ to XML functional construction</em>:</p>
<pre class="brush: plain;">var xml =
  new XElement(&#34;Customer&#34;,
    new XElement(&#34;Name&#34;, &#34;John Doe&#34;),
    new XElement(&#34;Expiration&#34;, &#34;2/1/2010&#34;),
    new XElement(&#34;AmountDue&#34;, &#34;$129.50&#34;));</pre>
<p>Next, we invoke <em>WordprocessingDocument.Open</em> to open the Word document for write access using the OpenXML SDK. We do this inside of a <em>using</em> block to ensure proper disposal of unmanaged resources in the event that unhandled exception occurs inside of the block. The boolean <em>true</em> value specified for the second parameter means that we&#8217;re opening the document for write access:</p>
<pre class="brush: plain;">var docxFile = @&#34;..\..\CustomerReminder.docx&#34;;
using (var wpd = WordprocessingDocument.Open(docxFile, true))</pre>
<p>Our code needs to do two things to the document at this point: add a new XML part containing the data to be bound, and assign the appropriate bindings to the content controls. Realize that this is code that will only execute once; subsequently, we&#8217;ll only be extracting/embedding the XML part from/to the document package using normal zip compression methods.</p>
<h3>Add a New XML Part</h3>
<p>With the document open and accessible to our code via the <em>wpd</em> variable, we invoke the <em>AddNewPart&#60;CustomXmlPart&#62;</em> method on <em>wpd.MainDocumentPart</em> to retrieve a new XML part in <em>xmlPart</em>. The new XML part exposes a <em>GetStream</em> method that enables us to stream content into and out of it. We take the generic <em>Stream</em> returned by <em>GetStream</em> and wrap a <em>StreamWriter</em> around it. The XML content can then be sent into the new XML part by writing to the <em>StreamWriter</em>. Again, we use nested <em>using</em> blocks on the stream objects to ensure proper cleanup if an exception occurs:</p>
<pre class="brush: plain;">var mainPart = wpd.MainDocumentPart;
var xmlPart = mainPart.AddNewPart&#60;CustomXmlPart&#62;();
using (Stream partStream = xmlPart.GetStream(FileMode.Create, FileAccess.Write))
{
  using (StreamWriter outputStream = new StreamWriter(partStream))
  {
    outputStream.Write(xml);
  }
}</pre>
<p>Now that the XML data is embedded as an XML part inside of the document&#8217;s <em>.docx</em> package, it&#8217;s available for data binding to content controls. The next and last thing we need to do is to programmatically find the tagged content controls inside the document and assign XML data bindings using the XPath expressions we defined in the content control tags.</p>
<h3>Add the Data Bindings</h3>
<p>Learning how to program Word with OpenXML is all about exploring the special XML markup language used by Word (a dialect known as <em>WordprocessingML</em>) and discovering the element and attribute names used to represent the document. You can view the document&#8217;s markup by examining the <em>word/document.xml</em> part inside of the <em>.docx</em> package. It can take quite a bit of detective work as you undergo the exploration and discovery process, but once you&#8217;re armed with the information you need, it&#8217;s very simple and straightforward to write a LINQ to XML query to get at what you need to in the document.</p>
<p>For example, here is how the customer name content control is expressed in WordprocessingML:</p>
<pre class="brush: plain;">&#60;w:sdt&#62;
     &#60;w:sdtPr&#62;
           &#60;w:tag w:val=&#34;Customer/Name&#34;/&#62;
           &#60;w:id w:val=&#34;852281&#34;/&#62;
           &#60;w:placeholder&#62;
                &#60;w:docPart w:val=&#34;DefaultPlaceholder_22675703&#34;/&#62;
           &#60;/w:placeholder&#62;
           &#60;w:showingPlcHdr/&#62;
           &#60;w:text/&#62;
     &#60;/w:sdtPr&#62;
     &#60;w:sdtContent&#62;
           &#60;w:r w:rsidRPr=&#34;004E1B99&#34;&#62;
                &#60;w:rPr&#62;
                      &#60;w:rStyle w:val=&#34;PlaceholderText&#34;/&#62;
                &#60;/w:rPr&#62;
                &#60;w:t&#62;Click here to enter text.&#60;/w:t&#62;
           &#60;/w:r&#62;
     &#60;/w:sdtContent&#62;
&#60;/w:sdt&#62;</pre>
<p>An analysis of this XML shows how Word stores content controls inside a document. Specifically, Word creates a <em>&#60;w:sdt&#62;</em> element (structured document tag) and nests a <em>&#60;w:sdtPr&#62;</em> element (structured document tag properties) inside of it. And nested beneath that, Word stores the content control&#8217;s tag name in the <em>w:val</em> attribute of a <em>&#60;w:Tag&#62;</em> element. These element names can be referred to programmatically using the OpenXML API type names <em>SdtRun</em>, <em>SdtProperties</em>, and <em>Tag</em>, respectively. Thus, the following LINQ to XML query retrieves all tagged content controls in our document:</p>
<pre class="brush: plain;">var taggedContentControls =
  from sdt in mainPart.Document.Descendants&#60;SdtRun&#62;()
  let sdtPr = sdt.GetFirstChild&#60;SdtProperties&#62;()
  let tag = (sdtPr == null ? null : sdtPr.GetFirstChild&#60;Tag&#62;())
  where tag != null
  select new
  {
     SdtProps = sdtPr,
     TagName = tag.GetAttribute(&#34;val&#34;, &#34;http://schemas.openxmlformats.org/wordprocessingml/2006/main&#34;).Value
  };</pre>
<p>In this query, the <em>from</em> clause uses the <em>Descendants&#60;SdtRun&#62;</em> method to retrieve all the <em>&#60;w:sdt&#62;</em> elements in the document. For each one, the first <em>let</em> clause uses the <em>GetFirstChild&#60;SdtProperties&#62;</em> method to retrieve the nested <em>&#60;w:sdtPr&#62;</em> element beneath it. The second <em>let</em> clause then performs a similar operation to retrieve the <em>&#60;w:tag&#62;</em> element nested beneath that. Since you cannot assume that every <em>&#60;w:sdt&#62;</em> element will always have a nested <em>&#60;w:sdtPr&#62;</em> element, the second <em>let</em> clause tests <em>sdtPr</em> for null before trying to invoke <em>GetFirstChild&#60;Tag&#62;</em> on it. The <em>where</em> clause ultimately filters our all content controls that have not been tagged.</p>
<p>The <em>select </em>clause constructs an anonymous type that returns two properties for each tagged content control. The first is the <em>&#60;w:sdtPr&#62;</em> which will be needed to reference the location at which we&#8217;ll inject the XML binding element. The second is the tag name extracted from the <em>&#60;w:tag&#62;</em> element&#8217;s <em>&#60;w:val&#62;</em> attribute (the full OpenXML namespace needs to be specified for <em>w</em> to retrieve the attribute value), which supplies the XPath expression for the binding. The LINQ query returns the results in a sequence that we then iterate to set the bindings:</p>
<pre class="brush: plain;">foreach (var taggedContentControl in taggedContentControls)
{
  var binding = new DataBinding();
  binding.XPath = taggedContentControl.TagName;
  taggedContentControl.SdtProps.Append(binding);
}

mainPart.Document.Save();</pre>
<p>For each tagged content control, we create a <em>DataBinding</em> object, set its <em>XPath</em> property to the tag name which is known provide an XPath expression referencing the desired XML data, and add the binding as a new element inside of the <em>&#60;w:sdtPr&#62;</em> element. Finally, invoking the <em>Save</em> method saves the modified document back to disk. If you examine the WordprocessingML now, you&#8217;ll see that our code added a &#60;w:dataBinding&#62; element with a w:xpath attribute to the &#60;w:sdtPr&#62; element in each content control. For example, the customer name content control now has the following element in its &#60;w:sdtPr&#62; section:</p>
<pre class="brush: plain;">&#60;w:dataBinding w:xpath=&#34;Customer/Name&#34; /&#62;</pre>
<p>Now let&#8217;s examine the docx package again. Add the <em>.zip</em> extension to the document filename and crack it open. Notice the new <em>customXML</em> folder that wasn&#8217;t there before. This is where all custom XML parts added to the document get stored.</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-12.png"><img title="WordBinding-12" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-12.png" alt="" width="628" height="280" /></a></p>
<p>Double-click the <em>customXML</em> folder to reveal the <em>item.xml</em> file contained inside of it:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-13.png"><img title="WordBinding-13" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-13.png" alt="" width="628" height="280" /></a></p>
<p>Now double-click <em>item.xml</em> to view it in IE:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-14.png"><img title="WordBinding-14" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-14.png" alt="" width="628" height="407" /></a></p>
<p>Look familiar? That&#8217;s the XML our code injected into the document as a custom XML part!</p>
<p>Now close the zip, rename the file back as <em>.docx</em>, and open it in Word:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-15.png"><img title="WordBinding-15" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-15.png" alt="" width="628" height="218" /></a></p>
<p>All the content placeholders have now been filled in with data from our XML file Does it get better than this? You bet! This thing works bi-directional. So go ahead and change John Doe to Sue Taylor:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-16.png"><img title="WordBinding-16" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-16.png" alt="" width="628" height="218" /></a></p>
<p>Now save the document, and rename it as <em>.zip</em> once again. This time, extract the <em>item.xml</em> file instead of opening it in IE, so that you can edit it in Notepad:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-17.png"><img title="WordBinding-17" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-17.png" alt="" width="382" height="209" /></a></p>
<p>Beautiful. Word pushed the data from the modified content controls in the document back out to the XML file. Let&#8217;s now edit the XML; for example, we&#8217;ll change the expiration date:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-18.png"><img title="WordBinding-18" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-18.png" alt="" width="382" height="209" /></a></p>
<p>Save the XML file, push it back into the zip package, rename the zip package back to <em>.docx</em>, and re-open it in Word one last time:</p>
<p><a href="http://lennilobel.wordpress.com/files/2009/11/wordbinding-19.png"><img title="WordBinding-19" src="http://lennilobel.wordpress.com/files/2009/11/wordbinding-19.png" alt="" width="628" height="218" /></a></p>
<p>Now that&#8217;s what I call data/view separation! With XML data binding in Word, your application can easily view and change data elements without ever digging into the document text.</p>
<p>Of course, this only scratches the surface of what&#8217;s possible with OpenXML. It&#8217;s also worth mentioning that the same thing can be achieved using VSTO (Visual Studio Tools for Office) and the Word object model, but we&#8217;ll leave that for a future post. Until then, happy coding!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Microsoft manipula organismos internacionais para "empurrar" padrões de documentos fechados.]]></title>
<link>http://almalivre.wordpress.com/2009/10/31/microsoft-manipula-organismos-internacionais-para-empurrar-padroes-de-documentos-fechados/</link>
<pubDate>Sat, 31 Oct 2009 12:15:49 +0000</pubDate>
<dc:creator>stellarium</dc:creator>
<guid>http://almalivre.wordpress.com/2009/10/31/microsoft-manipula-organismos-internacionais-para-empurrar-padroes-de-documentos-fechados/</guid>
<description><![CDATA[Esse post é para aqueles que insistem em agir como a &#8220;turma do deixa disso&#8221;, sempre entr]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://almalivre.wordpress.com/files/2009/07/broken_windows.jpeg"><img class="alignleft size-full wp-image-136" title="broken_windows" src="http://almalivre.wordpress.com/files/2009/07/broken_windows.jpeg" alt="broken_windows" width="116" height="77" /></a></p>
<p>Esse post é para aqueles que insistem em agir como a &#8220;turma do deixa disso&#8221;, sempre entrando em discussões com expressões do tipo &#8220;não entendo todo esse ódio à Microsoft&#8221; ou &#8220;o melhor software é aquele que mais gostamos&#8221;. Isso é pra mostrar que nenhuma grande empresa, principalmente se for monopolista no seu ramo de atividades, é boazinha ou está preocupada com seus clientes, aos quais chama de &#8220;consumidores&#8221;. O objetivo de todas elas, sem excessão, é o lucro a qualquer preço e ilude-se quem defende essas empresas apaixonadamente,<strong> sem conhecimento dos fatos</strong>.</p>
<p>Este também é um post para os que lutam por uma sociedade mais justa e mais humana, que tenha por objetivo o desenvolvimento humano e a valorização das pessoas, em detrimento do poder econômico.</p>
<p><!--more-->É revoltante ver o que essa empresa faz para conseguir o que deseja. A delegação brasileira na BRM (Ballot Resolution Meeting) da ISO foi ultrajada e as demais delegações de 37 países foram feitas de palhaços para que a proposta da Microsoft de um &#8220;padrão&#8221; de documentos fechado (binário), conhecido como OpenXML fosse aprovada como uma proposta de norma (ISO/IEC DIS 29500, Information Technology &#8211; Office Open XML file formats).</p>
<p>A ISO/IEC DIS 29500:2008 é uma proposta de norma internacional apresentada pela Microsoft para concorrer com a ISO/IEC DIS 26000:2006 que trata do mesmo assunto, porém já aprovada e em vigor, e que instituiu o padrão ODF (Open File Document) como norma internacional de formatação de documentos como textos, planilhas de cálculo e apresentações. Segundo a Microsoft, essa proposta tem a intenção de ser implementada em múltiplas aplicações e plataformas. De acordo com a Microsoft, um dos seus objetivos é assegurar a preservação de documentos a longo prazo, criados nas últimas duas décadas, utilizando programas que seriam incompatíveis com a norma ISO/IEC 26000:2006, devido aos avanços da tecnologia da informação.</p>
<p>Até aí, nada de mais. Entretanto, se a proposta é tão inocente e idônea, por que a Microsoft utilizou de meios não ortodoxos (para não dizer inescrupulosos) para fazer valer sua proposta? Por que o padrão não pode ser e não foi avaliado pelos especialistas? Por que a direção da ISO foi manipulada a corroborar com essas práticas desonestas?</p>
<div class="mceTemp">
<dl class="wp-caption alignright">
<dt class="wp-caption-dt"><a href="http://almalivre.wordpress.com/files/2009/07/odf_logo.jpg"><img class="size-full wp-image-301" title="ODF_logo" src="http://almalivre.wordpress.com/files/2009/07/odf_logo.jpg" alt="ODF_logo" width="89" height="122" /></a></dt>
</dl>
</div>
<p>Recentemente, recebi um comentário de uma pessoa que se identificou apenas como Rodrigo, em outro post, onde comentava sobre o<a title="Microsoft SOL... Cuidado!" href="http://almalivre.wordpress.com/2009/10/20/microsoft-sol-cuidado/" target="_blank"> Microsoft SOL</a> e seus perigos para os pequenos e médios empresários. Neste comentário, Rodrigo disse que &#8220;não é verdade que a Microsoft não segue padrões&#8221;. Bom, lendo os depoimentos de Jomar Silva, um dos integrantes da delegação brasileira na reunião. Jomar Silva tem sido, nos últimos 3 ou 4 anos, um denunciador das práticas desonestas da Microsoft nos bastidores dos organismos internacionais de normatização e é uma autoridade no assunto.</p>
<p>Jomar Silva é engenheiro eletrônico, pós graduado em gestão de projetos e desenvolvimento de sistemas e Diretor Geral da ODF Alliance Chapter Brasil. Atua no mercado de TI desde 1996, com ênfase no desenvolvimento de software em projetos de Pesquisa e Desenvolvimento para empresas do setor de Telecomunicações e Tecnologia da Informação. Atua ainda como &#8220;advisor&#8221; em padrões abertos junto a indústria de software. É coordenador do Grupo e Trabalho na ABNT que tratou da adoção do ODF como norma brasileira e membro do OASIS ODF TC (comitê internacional que desenvolve o padrão ODF). Isso lhe confere a autoridade para falar com conhecimento de causa.</p>
<p>Vejam toda a história aqui:</p>
<p><a title="Blog do Jomar Silva" href="http://www.itweb.com.br/blogs/blog.asp?cod=86" target="_blank">http://www.itweb.com.br/blogs/blog.asp?cod=86</a><br />
<a title="Void Life" href="http://homembit.com/2009/10/openxml-o-que-eu-ainda-nao-contei-sobre-o-brm.html" target="_blank">http://homembit.com/2009/10/openxml-o-que-eu-ainda-nao-contei-sobre-o-brm.html</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[A área cinzenta do ODF]]></title>
<link>http://almalivre.wordpress.com/2009/10/22/a-area-cinzenta-do-odf/</link>
<pubDate>Fri, 23 Oct 2009 00:02:57 +0000</pubDate>
<dc:creator>stellarium</dc:creator>
<guid>http://almalivre.wordpress.com/2009/10/22/a-area-cinzenta-do-odf/</guid>
<description><![CDATA[Open Document Format - Formato Aberto de Documentos Enquanto nas listas de discussão, fóruns e comun]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div id="attachment_301" class="wp-caption alignleft" style="width: 99px"><a href="http://almalivre.wordpress.com/files/2009/07/odf_logo.jpg"><img class="size-full wp-image-301" title="ODF_logo" src="http://almalivre.wordpress.com/files/2009/07/odf_logo.jpg" alt="Open Document Format - Formato Aberto de Documentos" width="89" height="122" /></a><p class="wp-caption-text">Open Document Format - Formato Aberto de Documentos</p></div>
<p>Enquanto nas listas de discussão, fóruns e comunidades das redes de relacionamento ainda se discute apaixonadamente questões como &#8220;quem é melhor, Linux ou Windows&#8221;, nos grandes organismos internacionais verdadeiras batalhas para definir o que eu, você e o resto dos pobres mortais do planeta usaremos ou deixaremos de usar em nossos computadores num futuro muito próximo. Nestes locais pode-se encontrar gente muito jovem e trabalhadora como Jomar Silva, Alexandre Oliva, César Taurion, Rubens Queiroz entre muitos outros, mas também encontra-se gente muito velhaca e mal-intencionada. Acompanhando os posts sobre a guerra de bastidores entre os padrões ODF e OpenXML no blog do Jomar Silva, começamos a entender por que as coisas são do jeito que são, e também começamos a entender por que as pessoas são manipuladas a tal ponto, que defendem cegamente uma corja de sacanas, cujo único objetivo é manter seus lucros e de seus patrões o maior tempo possível no ponto mais alto possível.<!--more--></p>
<p>Só para dar um exemplo, vou transcrever aqui dois posts do Jomar Silva sobre a guerra do ODF x OpenXML e espero que quem tiver o interesse de ler, divulgue e esclareça para as pessoas comuns, o quanto elas são manipuladas e usadas como massa de manobra o tempo todo, mesmo que não saibam.</p>
<p>O primeiro texto pode ser encontrado aqui:  <a title="A área cinzenta do ODF" href="http://homembit.com/2009/07/a-area-cinzenta-do-odf.html" target="_blank">http://homembit.com/2009/07/a-area-cinzenta-do-odf.html</a></p>
<p>O segundo texto pode ser encontrado aqui: <a title="Open XML - Quem enganou quem?" href="http://homembit.com/2009/10/openxml-quem-enganou-quem.html" target="_blank">http://homembit.com/2009/10/openxml-quem-enganou-quem.html</a></p>
<p>É de deixar qualquer cidadão com um mínimo de consciência revoltado até o tutano do osso.</p>
<p>Texto 1:</p>
<blockquote>
<div>
<h3><a rel="bookmark" href="http://homembit.com/2009/07/a-area-cinzenta-do-odf.html">A área cinzenta do ODF</a></h3>
<div>July 29th, 2009 <!-- by homembit --></div>
</div>
<p>Não, o título acima não se refere a uma parte qualquer da especificação, mas ao “ecossistema” que está formado em torno do ODF nos dias de hoje. Há dois anos atrás, quando o assunto era ODF, existiam apenas três tipos de pessoas no mundo:</p>
<blockquote><p>1 &#8211; As que não conheciam o ODF.</p></blockquote>
<blockquote><p>2 &#8211; As que eram favoráveis ao ODF.</p></blockquote>
<blockquote><p>3 &#8211; As que eram contrárias ao ODF.</p></blockquote>
<p>Era muito fácil conhecer cada um dos tipos, e vivíamos numa época conturbada, mas de ações claras e transparentes. Sabíamos quem era quem.</p>
<p>Hoje em dia, as três categorias acima estão praticamente reduzidas a duas:</p>
<blockquote><p>1 &#8211; As que não conhecem o ODF.</p></blockquote>
<blockquote><p>2 &#8211; As que são favoráveis ao ODF.</p></blockquote>
<p>A terceira categoria morreu ? … Mais ou menos.</p>
<p>Com o crescimento na adoção internacional do padrão ODF, está se tornando cada vez mais politicamente incorreto ser contra o padrão e por isso, todas aquelas pessoas que tanto fizeram para atrapalhar a adoção, divulgação e desenvolvimento do padrão, hoje se apresentam como “parceiros do ODF” ou “apoiadores do ODF”.</p>
<p>Na verdade, são lobo em pele de cordeiro, trabalhando sorrateiramente para cumprir a mesma agenda (agora oculta), só que do lado de dentro, sem levantar muitas suspeitas dos mais novos e ingênuos na área.</p>
<p>Com isso, tenho sido obrigado a ver estes caras participando de listas de discussão sobre ODF, quer sejam elas de usuários ou desenvolvedores de aplicações, desenvolvendo aplicações de validação e suporte ao ODF e pasmem, até participando (ou tentando participar) do ODF TC.</p>
<p>Nas listas de discussões, o que mais me irrita é a quantidade de vezes que eles utilizam os mesmos argumentos já ultrapassados, copiando e colando uma quantidade gigantesca de texto inútil de uma lista para outra. O pior é que isso toma um tempo enorme das pessoas que realmente trabalham pelo ODF, pois a quantidade de FUD que esse pessoal espalha é assustadora. São a indústria da desinformação.</p>
<p>Para ser honesto, existe uma pessoa em particular dentro deste grupo que se estivesse aqui no Brasil, a comunidade já tinha dado um jeito nele: seria banido. Esse cara é tão chato, mas tão chato que chega a repetir os mesmos argumentos estúpidos e infundados há mais de três anos e ainda tem muita gente que acredita que ele está falando coisa com coisa… sempre o mesmo “copiar e colar”, lista após lista.</p>
<p>Se vocês quiserem um exemplo do tipo de coisa que essa turma é capaz, deem uma olhada na entrada do ODF na Wikipedia (em <a href="http://en.wikipedia.org/wiki/OpenDocument_Format">inglês</a>). Há pouco tempo atrás, era uma importante fonte de informação para o padrão, além de ter a lista mais atualizada que eu conhecia das aplicações que o suportavam. Durante algum tempo, eu ajudei a manter o verbete e coloquei lá todas as informações iniciais sobre adoções de ODF no mundo todo, e perdi alguns dias para coletar, organizar e formatar toda a informação.</p>
<p>Agora, a entrada está completamente detonada.</p>
<p>O primeiro ataque removeu toda a lista de aplicações e a resumiu a uma ridícula lista de seis suítes de escritório, estranhamente incluindo o Microsoft Office (versão antigas via plug-in do Codeplex e versão nova via SP2). Na definição da norma, diziam que o ODF era parecido com o OpenXML. Na lista de adoções que eu tanto trabalhei para montar, deram um jeito de enfiar OpenXML em uma meia dúzia de países, nem que fosse com absurdos como “no documento o OpenXML é citado”… quem será que teria interesse em uma coisas dessas ?</p>
<p>Durante alguns dias, eu até tentei entrar lá e arrumar os estragos que estavam fazendo mas na boa, não tenho mais idade para brincar de gato e rato com delinquente… Se querem a Wikipedia bagunçada, que a tenham, para que fique claro que o jogo deles é sujo mesmo !!! (e o mesmo vale para a entrada sobre a ODF Alliance, que sofre do mesmo problema).</p>
<p>Me dá pena ver agora na Wikipedia a mensagem de que “aparentemente existe um conflito de interesses” com as contribuições ao artigo… não somos todos favoráveis ao ODF ???</p>
<p>É isso que eles querem… confundir, iludir, atrapalhar, retardar… ajudar a dar errado !!! E que isso sirva de lição e de prova para todos aqueles que acham que já está tudo resolvido !!!</p>
<p>Quando me preparava para escrever este post, elaborei a lista completa com os nomes, endereços de e-mail, blogs, sites e em alguns casos empresas de cada um dos “operários da área cinzenta” que já consegui identificar. Com a ajuda de alguns amigos de confiança do mundo todo, preparei ainda uma coletânea de informações que comprovam o passado questionável e não tão distante dessas pessoas.</p>
<p>Como eu acredito que uma boa conversa é sempre primordial antes de uma atitude mais enérgica, resolvi escrever este post para lhes dar um sincero aviso:</p>
<blockquote>
<p align="left"><em>“Eu sei quem vocês são, onde vocês estão, com quem se relacionam, de onde vieram e o que vocês estão tentando fazer.</em></p>
<p align="left"><em>Não me forcem a divulgar tudo isso aqui neste blog, pois a capacidade de cruzamento de informações que teremos a partir daí pode lhes desmascarar de uma vez por todas… e desmascarar ainda quem está por trás de tudo isso.</em></p>
<p align="left"><em>Respeitem o ODF e quem trabalha honestamente para seu desenvolvimento e divulgação.</em></p>
<p align="left"><em>Não testem a minha paciência. Com vocês ela é inexistente !</em></p>
<p align="left"><em>Parem de brincar com coisa séria, e saiam logo desta zona cinzenta (podem voltar para a oposição… eu não me importo com vocês).”</em></p>
</blockquote>
<p>Antes que alguém fique “tendo ideias”, saiba que estas informações que tenho estão salvaguardadas com amigos fieis em diversos países do mundo.</p></blockquote>
<p>Texto 2:</p>
<blockquote>
<div>
<h3><a rel="bookmark" href="http://homembit.com/2009/10/openxml-quem-enganou-quem.html">OpenXML: Quem enganou quem ?</a></h3>
<div>October 14th, 2009 <!-- by homembit --></div>
</div>
<p>Comecei hoje a desgastante tarefa de ler as correções e emendas ao OpenXML que serão votadas na ISO nos próximos dois meses, e me com isso acabei me lembrando de uma pergunta crucial ainda sem resposta sobre o OpenXML: Quem enganou quem ?Há mais de dois meses foi divulgado o processo que a Microsoft perdeu sobre violação de patentes no OpenXML (o caso i4i). Há quase dois meses, foi publicado <a href="http://www.groklaw.net/articlebasic.php?story=20090817235436439" target="_blank">um excelente artigo no Groklaw</a> sobre o tema, mas até agora eu não vi nenhuma explicação por parte dos envolvidos, então resolvi escrever este post para explicar com detalhes o que aconteceu, na esperança de que os envolvidos tenham um pingo de decência, caráter e dignidade para responder.</p>
<p>Acho que esta é uma excelente oportunidade para lembrar aos responsáveis pela ISO/IEC, que tudo o que vou relatar ocorreu em um mundo G-8, em que os países que apelaram contra o OpenXML não faziam “parte do grupo”. Hoje vivemos no mundo do G-20 e este é um excelente momento para os senhores demonstrarem que possuem a capacidade readequar suas instituições á nova realidade Internacional. Há um ano, vocês optaram por simplesmente ignoraram os apelos feitos por países em desenvolvimento.</p>
<p>Vamos lembrar da cronologia dos fatos:</p>
<p>Em Março de 2007, a empresa i4i apresenta uma queixa contra a Microsoft sobre violação de patente no OpenXML aos tribunais americanos. Nesta mesma época, o ECMA já estava iniciando seu explicatório dentro do SC34, tentando justificar que o Fast Track (6 meses de prazo) era adequado para a avaliação do OpenXML (mais de 6 mil páginas de especificação). Esta fase do processo ficou conhecida como a fase dos contraditórios.</p>
<p>O tempo passou, o Fast Track foi aceito e o litígio “i4i vs Microsoft” caminhou na justiça. A votação do OpenXML aconteceu e como já era esperado, a especificação foi REJEITADA por ampla maioria no JTC1, e a decisão se amparava em mais de 3 mil problemas técnicos identificados.</p>
<p>O BRM (Ballot Resolution Meeting) foi então convocado, e confesso que até hoje eu não entendo qual era a intenção de quem decidiu convocar esta reunião: Discutir mais de 3 mil problemas técnicos em 5 dias é humanamente impossível (e qualquer cidadão de bem, com sanidade mental e o mínimo de respeito e vergonha na cara percebe isso).</p>
<p>Foi definido também o coordenador do BRM, Alex Brown (que aliás teve papel crucial no resultado final do OpenXML, mas isso é assunto para outro post, pois ainda não revelei tudo o que vi em Genebra), e ele publica em seu blog um FAQ sobre as regras do BRM. Este FAQ circulou ainda como documento oficial da ISO e pode ser lido <a href="http://www.jtc1sc34.org/repository/0932.htm" target="_blank">aqui</a>.</p>
<p>Olhem o que está escrito neste documento:</p>
<blockquote><p><em>4.1 Problemas relacionados com Direitos de Propriedade Intelectual serão discutidos no BRM ?</em></p>
<p><em>Não. Problemas referentes a Direitos de Propriedade intelectual neste processo são de domínio exclusivo do ITTF. Estes problemas foram previamente delegados por TODOS os membros da ISO e do IEC (NBs) aos CEOs da ISO e do IEC e estes por sua vez, examinaram-os e não encontraram problemas. NBs buscando se certificar disso, devem procurar outros caminhos que não o BRM.</em></p></blockquote>
<p>Em outras palavras, os CEOs da ISO e do IEC (autoridades máximas das duas entidades) já haviam avaliado as questões de propriedade intelectual sobre o OpenXML e não encontraram nada, e por isso nenhum comitê no mundo todo precisava se preocupar com a questão… Me lembro de ter questionado esta informação algumas vezes, e a resposta foi sempre a mesma: “Garoto, você está duvidando dos CEOs da ISO e do IEC ?”… e o processo da i4i… como fica ?</p>
<p>Para “não duvidar dos CEOs da ISO e do IEC”, a única explicação que tenho para este fato é a seguinte:</p>
<blockquote><p><em>“Houve uma conspiração entre ECMA e Microsoft para omitirem da ISO/IEC o processo da i4i, pois se este processo fosse de conhecimento da ISO/IEC e dos NBs, não tenho dúvidas que o Fast Track do OpenXML seria, no mínimo, suspenso.”</em></p></blockquote>
<p>É impossível acreditar que a Microsoft, que possui os advogados mais caros do mundo, não sabia do processo que sofria (há mais de um ano na época do BRM).</p>
<p>Grande parte dos delegados do ECMA que conheci são funcionários da Microsoft ou parceiros de negócio da empresa. Este pessoal pode ser tudo, menos “desinformados” e por isso, não consigo acreditar que o ECMA não sabia do processo.</p>
<p>Por isso, troco a pergunta feita no Groklaw há quase dois meses por uma mais direta: Quem enganou quem ?</p>
<p>Que todos os NBs do mundo foram enganados, que os países viram seus nomes usados de forma inescrupulosa e que todos os delegados técnicos sérios e competentes foram feitos de idiota, já sabemos.</p>
<p>Espero realmente que as partes citadas se manifestem e respondam a toda a sociedade. Não vivemos mais num mundo onde absurdos como este podem ser aceitos, e não vou parar enquanto não encontrar uma resposta (e sei que não estou sozinho nessa busca).</p>
<p>Gostaria ainda de saber da ISO/IEC o que eles têm a dizer sobre tudo isso. Eles sabiam ou não do processo da i4i ?</p>
<p>Mais uma vez, faço um apelo aos CEOs da ISO e do IEC: O G-20 é uma realidade, e nunca é tarde para corrigir uma injustiça !</p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Dude, Where's My Worksheet?]]></title>
<link>http://robotbeerbash.wordpress.com/2009/09/22/hey-whered-my-worksheet-go/</link>
<pubDate>Tue, 22 Sep 2009 03:32:01 +0000</pubDate>
<dc:creator>wpaven</dc:creator>
<guid>http://robotbeerbash.wordpress.com/2009/09/22/hey-whered-my-worksheet-go/</guid>
<description><![CDATA[An Excel workbook can get &#8220;hidden&#8221; when you embed it within a PowerPoint. In Office 2007]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h4>An Excel workbook can get &#8220;hidden&#8221; when you embed it within a PowerPoint.</h4>
<p>In Office 2007, its possible to embed an Excel worksheet within a PowerPoint slide. You can do this from within PowerPoint by navigating to the &#8216;Insert&#8217; tab in the Ribbon and then clicking &#8216;Object&#8217; in the Text grouping.  The dialog box that appears will allow you to create one of several predefined New objects in your slide, or you can Browse to insert an existing object from a file.  From here we can select an Excel .xlsx we&#8217;ve created, and the worksheet will appear within our slide.</p>
<p>This can be very cool and useful if we have some analysis we&#8217;d like to present.  Also, whenever we select the inserted worksheet within the slide, it will automatically open in Excel so we can continue to tweak on it using Excel&#8217;s functionality.</p>
<p>So embed an Excel document in a PowerPoint (from an existing file). But don&#8217;t touch or select or tweak the embedding in the slide, just save the presentation .pptx somewhere. Change the .pptx extension to .zip, unzip the document, and you&#8217;ll find the embedded Excel .xlsx under /ppt/embeddings.  Yep, there&#8217;s a complete Excel .xlsx package within your PowerPoint .pptx.  Now open the .xlsx directly in Excel by double-clicking it; the Excel application will launch, but NOTHING IS VISIBLE! EVEN THOUGH THE SPREADSHEET IS THERE! EXCEL WILL APPEAR AS IF NO WORKBOOKS ARE OPENED!!!</p>
<p><img class="size-full wp-image-330 alignright" title="unhide-small" src="http://robotbeerbash.wordpress.com/files/2009/09/unhide-small.png" alt="unhide-small" width="435" height="289" /></p>
<p>You have to navigate to &#8216;View&#8217; on the Ribbon and click &#8216;Unhide&#8217; to see the document.</p>
<h4>What Happened?</h4>
<p>If you unzip the .xlsx and examine workbook.xml, you&#8217;ll find:</p>
<p>/workbook/bookViews/workbookView/@visibility = &#8220;hidden&#8221; .</p>
<p>This attribute is set for the embedded document, even though it wasn&#8217;t set in the original prior to embedding.</p>
<p>But guess what, if you would&#8217;ve tweaked the embedding by selecting it or resizing it in the slide prior to saving the .pptx, this attribute wouldn&#8217;t be set. You can open the .xlsx and the workbook IS VISIBLE.  This seems to be an odd quirk of PowerPoint&#8217;s default behavior that I stumbled upon while embedding documents programmatically.</p>
<p>I can understand why a behavior like this might go unnoticed if it&#8217;s expected the embedded document will only ever be opened within PowerPoint again. In PowerPoint the embedded .xlsx opens and is always visible within the context of the slides.</p>
<h4>Embed Shmembed.</h4>
<p>The thing is, I&#8217;m saving these documents to <a href="http://developer.marklogic.com/download/">MarkLogic Server</a>, where I automatically unzip all Office 2007 documents so I can search and reuse the XML, document parts, and original source .pptx, .xlsx, .docx, etc.  in the creation of new Office and other documents.  In MarkLogic, one of the things I&#8217;m doing for an app is making embedded Office docs available as independent documents within search results.  <em>It&#8217;s freedom baby, yeah! </em>And while we&#8217;re seeing this behavior with embedding, we now know that its possible to hide any workbook using that simple attribute.</p>
<p>So if we want our users to be able to view the Excel documents they are selecting for use,  a simple solution is to just remove the @visible and rezip the .xlsx in MarkLogic, either in the saved .xlsx, or when opening the embedded doc from the rezipping of its extracted parts, or both.  Remove that attribute and we&#8217;re all good for visibility.</p>
<p>Or,  if you&#8217;re feeling particularly ornery,  I guess you could add the attribute to all your organization&#8217;s Excel workbooks and watch your users go mad?  Maybe there&#8217;s a use-case for that, I don&#8217;t know.</p>
<p>But I thought this was interesting so I&#8217;d share.  Maybe this will help someone who&#8217;s tweaking on this random behavior or with AddOLEObject as well.  You can have a .xlsx on your filesystem.  You can unzip and see the workbook and worksheet parts.  You can double-click the .xlsx and it will open in Excel, but nothing is visible, even though the worksheet information *IS* saved in the .xlsx package and available in the Excel application.  It turns out the document is actually open, but hidden.   You just have to &#8216;Unhide&#8217; it.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Getting started with Open XML, ODF, IDML, and other zipped XML documents in MarkLogic]]></title>
<link>http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/</link>
<pubDate>Mon, 31 Aug 2009 04:06:23 +0000</pubDate>
<dc:creator>wpaven</dc:creator>
<guid>http://robotbeerbash.wordpress.com/2009/08/31/getting-started-with-open-xml-odf-idml-and-other-zipped-xml-documents-in-marklogic/</guid>
<description><![CDATA[Microsoft Office 2007, Open Office, and Adobe&#8217;s InDesign CS4 all have something in common.  Th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://en.wikipedia.org/wiki/Office_Open_XML">Microsoft Office 2007</a>, <a href="http://en.wikipedia.org/wiki/OpenDocument">Open Office</a>, and <a href="http://blogs.adobe.com/indesignsdk/2009/03/idml_file_types.html">Adobe&#8217;s InDesign CS4</a> all have something in common.  These applications all save their documents as .zip archives of XML files.  As an example, take any .docx, .odt, or .idml file and change the file extension to .zip. Extract the contents and within you&#8217;ll find multiple interrelated XML documents.  There are probably other document formats that follow this model as well, but these are the 3 I see questions for on a regular basis. When working with documents of this type, the first thing many people want to do is work with the XML within the zip packages.  Today&#8217;s post will demonstrate tools provided by <a href="http://developer.marklogic.com/download/default.xqy">MarkLogic Server</a> for working with these document types, as well as some methods for managing and using the extracted pieces.</p>
<p>To play along at home, <a href="http://robotcocktailparty.wordpress.com/2009/06/04/install-marklogic-server/">install MarkLogic Server</a>, and <a href="http://robotcocktailparty.wordpress.com/2009/07/29/setup-cq-on-marklogic-server/">setup CQ</a>.  The following examples work with the default Documents database and default Docs HTTP Server.  I&#8217;ll be using Word 2007 documents, as that&#8217;s kinda my thing, but you can use the same code, tools, and methods with the other file formats as well. Just replace the .docx in the samples below with a .odt or .idml file, etc., and everything will just auto-magically work. Ultimately they&#8217;re all just zip files of XML and associated resources.  Let&#8217;s do this!</p>
<h3>The Office OpenXML Extract pipeline</h3>
<p>It doesn&#8217;t get any easier than this.  If you&#8217;re working with Office 2007 documents, you can quickly configure the Server to automatically unzip these files when you save them to your database.  The XML within will be saved in a directory named for the original file, maintaining the naming and directory structure they had within the .zip.  To make this happen, we just need to install content processing and attach the Office OpenXML Extract pipeline.</p>
<h4><span style="text-decoration:underline;">Install Content Processing</span></h4>
<p>In the Admin UI, <strong>navigate to</strong>:</p>
<p><strong>Databases -&#62; Documents -&#62; Content Processing</strong></p>
<p>We see a message informing us that Content Processing is not installed. That&#8217;s ok.  <strong>Click the &#8216;Install&#8217; tab.</strong></p>
<p>Next we&#8217;re presented with an option to &#8216;enable conversion&#8217;.  If you&#8217;re running the Community Edition, leave this as false.  <strong>Click &#8216;install&#8217;.</strong></p>
<p>Finally, we&#8217;re presented with the message &#8216;Content Processing will be installed for the database test without conversion.&#8217; <strong>Click &#8216;ok&#8217;.</strong></p>
<p><em>Note: There are conversion utilities available that require a separate license.  If you are running a version of the Server other than Community, feel free to install these utilities by setting the enable conversion option to true.  For those on the Community Edition, installing content processing allows us to build our own conversion utilities, as well as take advantage of other available pipelines that don&#8217;t require the separate license. w00t!<br />
</em></p>
<p>Now that we&#8217;ve installed Content Processing, we just need to attach the Office OpenXML Extract pipeline.</p>
<h4><span style="text-decoration:underline;">Attach a Content Processing Pipeline</span></h4>
<p>In the Admin UI, <strong>navigate to</strong>:</p>
<p><span style="text-decoration:underline;"><strong> </strong></span></p>
<p><strong>Databases -&#62; Documents -&#62; Content Processing -&#62; Domains -&#62; Default Documents -&#62; Pipelines</strong></p>
<p>Make sure that the pipelines &#8216;Status Change Handling&#8217; and &#8216;Office OpenXML Extract&#8217; are checked.  Then <strong>click &#8216;ok&#8217;</strong>.</p>
<p>You&#8217;ll now see those pipelines are attached.</p>
<p><img class="alignnone size-full wp-image-226" title="pipelines" src="http://robotbeerbash.wordpress.com/files/2009/08/pipelines.png" alt="pipelines" width="631" height="477" /></p>
<p>Let&#8217;s take advantage our freshly configured pipeline. Open CQ and evaluate the following to insert a document.  I&#8217;m inserting C:\foo.docx.  The default domain for CPF is the root directory &#8220;/&#8221;, so remember to prefix the name of your file with &#8220;/&#8221; in the uri option so the document will be processed.</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     xdmp:document-load("C:\foo.docx",
                          &#60;options xmlns="xdmp:document-load"&#62;
                            &#60;uri&#62;/foo.docx&#60;/uri&#62;
                          &#60;/options&#62;)
</span></pre>
<p>To validate the pipeline ran for the document, evaluate the following in CQ:</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     xdmp:document-properties("/foo.docx"),
     xdmp:document-properties("/foo_docx_parts/word/document.xml")
</span></pre>
<p>Notice in the results returned that A) there are CPF properties on the .docx informing us the XML has been extracted, and B) we are looking at the properties for an extracted Part.  The document.xml is in a sibling directory of the original foo.docx named /foo_docx_parts/.  We now have the original zip package and all its extracted pieces available to us in the Server.  With Content Processing installed and our pipeline configured, anytime we save an Office document to the Server in the future they will be automatically unzipped and their parts will be saved similarly for us in a _parts directory.</p>
<p><img class="alignnone size-full wp-image-228" title="cqresults" src="http://robotbeerbash.wordpress.com/files/2009/08/cqresults.png" alt="cqresults" width="700" height="307" /></p>
<p><em>Note: The .docx and the parts directory are linked.  Delete the .docx, and the related _parts folder and its extracted pieces will be deleted as well.<br />
</em></p>
<p>So,  What are pipelines?  What&#8217;s Content Processing? What was all that configuration we did?</p>
<h3>CPF in a Nutshell ( the Content Processing Framework )</h3>
<p>MarkLogic Server includes a framework for processing content that we refer to lovingly as CPF.  CPF stands for the Content Processing Framework.  The gist is this: a document has a lifecycle that starts with creation and advances as users/applications update and modify the document.  CPF provides a way to take action on documents based on where they are in their lifecyle.</p>
<p>A pipeline is an XML document that describes a set of content processing steps. It defines the steps that occur during the processing of documents and defines actions that occur at each step.  These actions can be found in supporting XQuery functions and modules. CPF was built for you to create your own content processing applications, with your own content processing code, and following your own logical and business processes.</p>
<p>If you&#8217;d like to know more, you can check out the  <a href="http://developer.marklogic.com/pubs/4.1/books/cpf.pdf">Content Processing Framework guide,</a> I&#8217;ve also provided a <a href="http://developer.marklogic.com/columns/smallchanges/2007-12-11.xqy">quick intro here as well</a>.</p>
<p><em>Note: the quick intro linked here was written for MarkLogic Server 3.2. For 4.*.* some minor updates are required.  I&#8217;ll revisit and update that post in the future, but if you&#8217;re interested, the guide should provide enough info to help you modify the example successfully.<br />
</em></p>
<p>But what if we&#8217;re not working with Office 2007 documents?  Or we don&#8217;t want to use CPF?  Can we still unzip these documents, extract the individual XML files and insert them into our MarkLogic Database?  Yes.</p>
<h3>xdmp:zip utilities</h3>
<p>When working with .zip files, you&#8217;ll want to take a look at the functions <a href="http://developer.marklogic.com/pubs/4.1/apidocs/Document-Conversion.html#xdmp:zip-create">xdmp:zip-create()</a>, <a href="http://developer.marklogic.com/pubs/4.1/apidocs/Document-Conversion.html#xdmp:zip-get">xdmp:zip-get()</a>, and <a href="http://developer.marklogic.com/pubs/4.1/apidocs/Document-Conversion.html#xdmp:zip-manifest">xdmp:zip-manifest()</a>.</p>
<p>I have a Word document, sampleManuscript.docx, that I&#8217;ve saved in the directory C:\test.  I can take a look at the names of the files inside the .docx by evaluating the following in CQ:</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     xdmp:zip-manifest(xdmp:document-get("C:\test\sampleManuscript.docx"))
</span></pre>
<p><span style="color:#333333;">MarkLogic provides utilities for working with files on the filesystem, but let&#8217;s load our document into the Server.</span></p>
<p><span style="color:#333333;"><em>Note: For the following examples, we want to insure CPF <strong>does not</strong> process our documents for us. So <strong>navigate to pipelines</strong>, as we did in our configuration steps above.  <strong>Uncheck the Office OpenXML Extract pipeline,</strong> and <strong>click &#8216;ok&#8217;</strong>.  This will detach the pipeline so it will not action the example document below on load.</em><br />
</span></p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     xdmp:document-load("C:\test\sampleManuscript.docx",
                          &#60;options xmlns="xdmp:document-load"&#62;
                             &#60;uri&#62;/myManuscript/sampleManuscript.docx&#60;/uri&#62;
                          &#60;/options&#62;)
</span></pre>
<p>The above returns the empty sequence. You can validate that your document inserted properly by clicking &#8216;explore&#8217; in CQ.  Or by evaluating the following:</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     xdmp:document-properties("/myManuscript/sampleManuscript.docx")</span></pre>
<p>At a minimum, you&#8217;ll see a last-modified metadata timestamp for the document.  If you&#8217;ve enabled content processing for the database as we did above, you will see other cpf:* properties.  Assuming no pipelines are attached, the .docx will be in cpf:state initial and no action has been taken to extract its XML parts.</p>
<p>If we want to access a file within the .docx, assuming we know the name of the piece we want  in the .zip,  we can get it using xdmp:zip-get().  The following returns the XML for the document.xml file located within our .docx package.</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     xdmp:zip-get(fn:doc("/myManuscript/sampleManuscript.docx"),"word/document.xml")
</span></pre>
<p>Instead of having to know the names of individual pieces within a .zip package and/or having to extract individual files each time we want to access a piece of XML, let&#8217;s just unzip and extract the pieces from our.docx and insert them into a directory, similar to how CPF did for us.</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     declare namespace zip="xdmp:zip";

     let $doc := "/myManuscript/sampleManuscript.docx"
     let $directory-uri := "/myManuscript/sampleManuscript_docx_parts/"
     let $zipfile := fn:doc($doc)
     let $manifest := xdmp:zip-manifest($zipfile)
     for $part-name in $manifest/zip:part
         let $options := if ($part-name = "/_rels/.rels") then
                             &#60;options xmlns="xdmp:zip-get"&#62;
                               &#60;format&#62;xml&#60;/format&#62;
                             &#60;/options&#62;
                        else
                            &#60;options xmlns="xdmp:zip-get"/&#62;
         let $part := xdmp:zip-get($zipfile, $part-name, $options)
         let $part-uri := fn:concat($directory-uri, $part-name)
         return xdmp:document-insert($part-uri, $part)
</span></pre>
<p>We just loop through the manifest, extract the pieces, and insert into a directory. Here we&#8217;re explicitly telling the server to treat .rels as XML. With a little modification and refinement, we can easily take the above and make it into a re-usable module. We could even use this as a starting point for creating our own CPF pipeline action.</p>
<h3>Zip it!</h3>
<p><img class="size-medium wp-image-231 alignleft" title="zipit" src="http://robotbeerbash.wordpress.com/files/2009/08/zipit.jpg?w=300" alt="zipit" width="300" height="200" /></p>
<p>Now that we&#8217;ve extracted XML documents from zip files and saved them to the Server, lets zip &#8216;em back up.</p>
<p>When we extracted the pieces for sampleManuscript.docx above, we saved them to a directory named   /sampleManuscript_docx_parts/ and we specified this as a subdirectory of the folder /myManuscript/.</p>
<p>When we <a href="http://developer.marklogic.com/pubs/4.1/apidocs/UpdateBuiltins.html#xdmp:document-insert">insert a document</a> to MarkLogic, we specify the name of the file we are saving with a uri parameter (xs:string).  If this string has &#8220;/&#8221;s in it, the strings in between the slashes will be treated as directories. So &#8220;/&#8221; marks the path for our content&#8217;s location on the Server.  By default, MarkLogic is configured for automatic directory creation. This is done as many people like using directories to manage their content, and it can be very helpful when loading documents using webDAV.  It&#8217;s also very helpful for managing unzipped XML packages, as we want to retain the original structure of the document, so when we zip the pieces back up the document will open successfully it in its respective application.</p>
<p>We saved our extracted documents pieces to directories, but we don&#8217;t know what pieces were inserted, or what subdirectories were created.  If we enable the uri lexicon for our database, we can evaluate a query using <a href="http://developer.marklogic.com/pubs/4.1/apidocs/Lexicons.html#cts:uris">cts:uris</a> that will provide us the uris for all the extracted pieces.  We can then use this to create a manifest and zip the pieces back up.</p>
<h4><span style="text-decoration:underline;">Validate Directory Creation is Automatic</span></h4>
<p>In Admin UI, <strong>navigate to:</strong></p>
<p><strong>Databases -&#62; Documents</strong></p>
<p><strong>Scroll down</strong> until you see the property &#8216;<strong>directory creation</strong>&#8216;.  The dropdown selection is set to &#8216;<strong>automatic</strong>&#8216;.</p>
<p>For more info on directories, refer to the <a href="http://developer.marklogic.com/pubs/4.1/books/admin.pdf">Admin&#8217;s Guide</a>, and <a href="http://developer.marklogic.com/pubs/4.1/books/dev_guide.pdf">Application Developer&#8217;s Guide</a>.</p>
<h4><span style="text-decoration:underline;">Enable URI Lexicons</span></h4>
<p><strong>Scroll up</strong>, and a few properties up from &#8216;directory creation&#8217; you&#8217;ll find &#8216;<strong>uri lexicon</strong>&#8216;.  <strong>Set the enabled option</strong> to &#8216;<strong>true&#8217;</strong> and <strong>click &#8216;ok&#8217;</strong>.</p>
<p>Now head back to CQ, and evaluate the following:</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     let $directory := "/myManuscript/sampleManuscript_docx_parts/"
     return cts:uris("","document",cts:directory-query($directory,"infinity"))
</span></pre>
<p>The results are a list of all the XML documents we extracted from sampleManuscript.docx.  We can zip them back up and save locally by evaluating the following:</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     let $directory := "/myManuscript/sampleManuscript_docx_parts/"
     let $uris := cts:uris("","document",cts:directory-query($directory,"infinity"))

     let $parts := (for $i in $uris let $x := fn:doc($i) return $x)

     let $manifest := &#60;parts xmlns="xdmp:zip"&#62;
                      {
                       for $i in $uris
                       let $file := fn:substring-after($i,$directory)
                       let $part :=  &#60;part&#62;{$file}&#60;/part&#62;
                       return $part
                      }
                      &#60;/parts&#62;

     let $pkg := xdmp:zip-create($manifest, ($parts))
     return xdmp:save("C:\test.docx",$pkg)
</span></pre>
<p>Double-click on the saved file to open it in Word.  I&#8217;ve named it test.docx to demonstrate we can name it anything we want too. More likely we would&#8217;ve used the document&#8217;s original name, sampleManuscript.docx.</p>
<p>Most of the time though, we&#8217;ll want users to be able to dynamically generate their documents on the fly.  Place the following code in a module named opendocx.xqy.  Place it under the /Docs directory for the Server, which is found in the directory where MarkLogic is installed. On Windows the default is C:\Program Files\MarkLogic\Docs.</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     let $directory := "/myManuscript/sampleManuscript_docx_parts/"
     let $uris := cts:uris("","document",cts:directory-query($directory,"infinity"))

     let $parts := (for $i in $uris let $x := fn:doc($i) return $x)

     let $manifest := &#60;parts xmlns="xdmp:zip"&#62;
                      {
                       for $i in $uris
                       let $file := fn:substring-after($i,$directory)
                       let $part :=  &#60;part&#62;{$file}&#60;/part&#62;
                       return $part
                      }
                      &#60;/parts&#62;

     let $filename := "test.docx"
     let $pkg := xdmp:zip-create($manifest, ($parts))

     let $disposition := concat("attachment; filename=""",$filename,"""")
     let $x := xdmp:add-response-header("Content-Disposition", $disposition)
     let $x:= xdmp:set-response-content-type("application/vnd.openxmlformats-officedocument.wordprocessingml.document")
     return $pkg
</span></pre>
<p>In a browser, navigate to the url http://localhost:8000/opendocx.xqy.</p>
<p>Assuming Office 2007 is installed on your machine, the document opens right up into its respective application.</p>
<p><img class="alignnone size-full wp-image-229" title="lorem" src="http://robotbeerbash.wordpress.com/files/2009/08/lorem.png" alt="lorem" width="719" height="413" /></p>
<p>We can just open the .docx as well. Save the following under /Docs as opendocx2.xqy.  Update the url in your browser, and the file will again open from the Server into Word.</p>
<pre style="font-size:1.2em;white-space:pre-wrap;"><span style="color:#990000;">     xquery version "1.0-ml";
     let $docname := "/myManuscript/sampleManuscript.docx"
     let $pkg := fn:doc($docname)
     let $filename := "test.docx"
     let $disposition := concat("attachment; filename=""",$filename,"""")
     let $x := xdmp:add-response-header("Content-Disposition", $disposition)
     let $x:= xdmp:set-response-content-type("application/vnd.openxmlformats-officedocument.wordprocessingml.document")
     return $pkg
</span></pre>
<p>And there you have it!  To the Server and back again!  Kind of like the Hobbit, but you didn&#8217;t need Gandalf or a bunch of dwarves to help you make the journey.</p>
<p>That should be more than enough to get you started, and to continue with something super awesome, just ponder this: when you have a solid understanding of the document format you&#8217;re working with, you can generate  Word, Excel, PowerPoint, OpenOffice, InDesign4, and any other document type on the Server, and you don&#8217;t even need the original application to start with! We can generate these documents dynamically, on-the-fly, and serve &#8216;em up to our users who use these applications, but to us on the Server, it&#8217;s just a set of XML and related parts.  Cheers!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Microsoft Việt Nam tặng sách Open XML - Ngôn ngữ đặc tả dành cho tài liệu VP]]></title>
<link>http://congthinh.wordpress.com/2009/08/06/microsoft-viet-nam-tang-sach-open-xml-ngon-ngu-dac-ta-danh-cho-tai-lieu-vp/</link>
<pubDate>Thu, 06 Aug 2009 08:43:15 +0000</pubDate>
<dc:creator>congthinh</dc:creator>
<guid>http://congthinh.wordpress.com/2009/08/06/microsoft-viet-nam-tang-sach-open-xml-ngon-ngu-dac-ta-danh-cho-tai-lieu-vp/</guid>
<description><![CDATA[Microsoft Việt Nam tặng 26 cuốn sách &#8220;Open XML – Ngôn ngữ đặc tả dành cho tài liệu văn phòng]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Microsoft Việt Nam tặng 26 cuốn sách <em>&#8220;Open XML – Ngôn ngữ đặc tả dành cho tài liệu văn phòng&#8221;</em> của tác giả Wouter van Vugt. Microsoft Việt Nam sẽ gửi tặng cho các công ty có quan tâm hoặc lập trình liên quan đến xử lý tập tin OpenXML ví dụ như tìm kiếm, nén, phân tích tập tin.</p>
<p style="text-align:center;"><img class="aligncenter" src="http://i.windowsvn.net/wp-content/uploads/2009/08/OpenXML_Explained.jpg" alt="Open XML - Ngôn ngữ đặc tả" /></p>
<p><!--more--><br />
Giới thiệu nội dung sách:</p>
<blockquote><p>Ngôn ngữ đặc tả dữ liệu văn phòng Open XML đã được nhiều người làm công tác tin học ở Việt Nam biết đến như một trong những biến thể của ngôn ngữ dữ liệu XML phổ dụng hiện nay. Open XML cung cấp một môi trường mở và chuẩn hóa được xây dựng trên rất nhiều chuẩn sẵn có như XML, ZIP và Xml-Schema. Vì những kỹ thuật này xâm nhập vào tất cả các nền tảng được sử dụng hiện nay, tài liệu sẽ không còn là một hộp đen chứa dữ liệu định dạng. Thay vào đó, tài liệu đã trở thành dữ liệu. Dễ dàng cho việc tích hợp vào các qui trình kinh doanh. Open XML cung cấp một số công nghệ mới cho phép các dữ liệu kinh doanh có thể được biểu hiện bên ngoài thành chính tài liệu nhằm dễ dàng hơn cho việc truy cập đến những vùng quan trọng và việc tái sử dụng tài liệu.</p></blockquote>
<p>Cùng với sự phổ biến rộng khắp của các định dạng tài liệu văn phòng trong bộ công cụ Microsoft Office, việc áp dụng Open XML là một hướng mở, chuẩn hóa đáp ứng yêu cầu của đa số người dùng. Tuy vậy, cho đến nay nước ta chưa có một tài liệu nghiêm túc và đầy đủ về Open XML. Một tập thể cán bộ của Viện Công nghệ Thông tin kết hợp với Microsoft Việt Nam đã dịch cuốn <em>&#8220;Open XML – Ngôn ngữ đặc tả dành cho tài liệu văn phòng&#8221;</em> của tác giả <em><strong>Wouter van Vugt</strong></em> nhằm mục đích cung cấp cho người sử dụng và các nhà phát triển phần mềm những kiến thức cơ bản về Open XML.</p>
<p>Mục tiêu của cuốn sách này là cung cấp cho bạn những khối ghép cần thiết cho việc xây dựng các giải pháp xoay quanh tài liệu. Trong cuốn sách này bạn sẽ khám phá những cơ sở của WordprocessingML, SpreadsheetML và PresentationML cùng với ngôn ngữ hỗ trợ DrawingML; học về cách dùng chỉ dấu biệt chế cho phép các ứng dụng dùng WordprocessingML, các công thức của SpreadsheetML hoặc các hiệu ứng đồ họa tuyệt vời của DrawingML. Cuốn sách sẽ có ích cho rất nhiều nhà kiến trúc phần mềm, người phát triển có nhu cầu xây dựng các giải pháp xoay quanh tài liệu muốn xây dựng các giải pháp gia tăng dựa trên nền tảng Open XML.</p>
<p>Click <a target="_blank" href="http://msdnvietnam.net/forums/p/1145/1697.aspx#1697">vào đây để đăng ký</a> nhận sách OpenXML từ Microsoft Việt Nam</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to get Data from Dataset into Sqlserver Table by using OPENXML Method?]]></title>
<link>http://sqlmca.wordpress.com/2009/07/29/how-to-get-data-from-dataset-into-sqlserver-table-by-using-openxml-method/</link>
<pubDate>Wed, 29 Jul 2009 14:26:50 +0000</pubDate>
<dc:creator>Kuldip Bhatt</dc:creator>
<guid>http://sqlmca.wordpress.com/2009/07/29/how-to-get-data-from-dataset-into-sqlserver-table-by-using-openxml-method/</guid>
<description><![CDATA[Some time we need data from Dataset into Sqlserver for insertion or updation in the Sqlserver Tables]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Some time we need data from Dataset into Sqlserver for insertion or updation in the Sqlserver Tables.</p>
<p>For example if you need to insert an image then you can use this method to insert the data in Sqlserver tables.</p>
<p>Today, I will explain how to get data from Dataset into Sqlserver Table.</p>
<p><strong>&#8211; Code for .Net</strong></p>
<p><em>Dim ds as new Dataset</em></p>
<p><em>Dim dt as new Table</em></p>
<p><em>dt.TableName = &#8220;MyTable&#8221;</em></p>
<p><em>ds.Tables.add(dt)</em></p>
<p><em>Dim lStrWriter As New StringWriter</em></p>
<p><em>Dim lStr As String</em></p>
<p><em>ds.WriteXML(lStrWriter)</em></p>
<p><em>lstr = lStrWriter.Tostring</em></p>
<p>Pass this lstr variable to the procedure as parameter &#8211; @xmldoc.</p>
<p>Now write the code procedure to get the data from Dataset.</p>
<p><strong> &#8212; Code in Sqlserver Store Procedure</strong></p>
<p><em>CREATE PROCEDURE [dbo].[TestXML]</em></p>
<p><em>@xmldoc text &#8212; Give Text datatype for getting xml from dataset</em></p>
<p><em>as</em></p>
<p><em>&#8212;&#8212;&#8212;Read the Datset  From XML &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</em></p>
<p><em>&#8211; call sp_xml_preparedocument</em></p>
<p><em>DECLARE @idoc int</em></p>
<p><em>EXEC sp_xml_preparedocument @idoc OUTPUT, @xmldoc</em></p>
<p><em>SELECT * into #TestTable</em></p>
<p><em>FROM OPENXML (@idoc, &#8216;/NewDataSet/MyTable&#8217;,2)</em></p>
<p><em>WITH (pk_Userid  BigInt,</em></p>
<p><em>UserName  Varchar(10))</em></p>
<p><em>EXEC sp_xml_removedocument @idoc</em></p>
<p><em>&#8212;&#8212;&#8212;- End Read &#8212;&#8212;&#8212;-</em></p>
<p><em>END</em></p>
<p>BY the use of this procedure you get all the data from dataset in to the &#8221;#Testtable&#8221; and we can use this as Sqlserver table in procedure.</p>
<p>I hope this article will be useful to you, Please give feedback on this article.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Merge Documents using C#]]></title>
<link>http://babul.wordpress.com/2009/06/03/merge-documents-using-c/</link>
<pubDate>Wed, 03 Jun 2009 12:21:24 +0000</pubDate>
<dc:creator>Babul</dc:creator>
<guid>http://babul.wordpress.com/2009/06/03/merge-documents-using-c/</guid>
<description><![CDATA[]]></description>
<content:encoded><![CDATA[<div class='snap_preview'></div>]]></content:encoded>
</item>
<item>
<title><![CDATA[OpenXML SpreadsheetML Cell Formatting]]></title>
<link>http://drybridge.wordpress.com/2009/04/16/openxml-spreadsheetml-cell-formatting/</link>
<pubDate>Thu, 16 Apr 2009 15:03:26 +0000</pubDate>
<dc:creator>art colman</dc:creator>
<guid>http://drybridge.wordpress.com/2009/04/16/openxml-spreadsheetml-cell-formatting/</guid>
<description><![CDATA[OpenXML SpreadsheetML Cell Formatting Here is some quick and dirty information related to formatting]]></description>
<content:encoded><![CDATA[OpenXML SpreadsheetML Cell Formatting Here is some quick and dirty information related to formatting]]></content:encoded>
</item>
<item>
<title><![CDATA[Opening MSOffice2007 files]]></title>
<link>http://dubowik.wordpress.com/2009/04/14/opening-msoffice2007-files/</link>
<pubDate>Tue, 14 Apr 2009 20:17:05 +0000</pubDate>
<dc:creator>dubowik</dc:creator>
<guid>http://dubowik.wordpress.com/2009/04/14/opening-msoffice2007-files/</guid>
<description><![CDATA[I have just learned an interesting thing. Someone has sent me a MSWord2007 document in an email. Wit]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have just learned an interesting thing. Someone has sent me a MSWord2007 document in an email. Without really thinking about it I replied that I could not open it and asked for a Word97 version. But then, just for curiosity I clicked on the attachment and to my amazement it opened with OpenOffice! And it wasn&#8217;t the latest OOo version it was 2.4 included in Ubuntu Intrepid.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Estaria o MS OOXML realmente pronto quando foi aprovado?]]></title>
<link>http://antoniofonseca.wordpress.com/2009/04/11/estaria-o-ms-ooxml-realmente-pronto-quando-foi-aprovado/</link>
<pubDate>Sat, 11 Apr 2009 13:58:46 +0000</pubDate>
<dc:creator>ASF</dc:creator>
<guid>http://antoniofonseca.wordpress.com/2009/04/11/estaria-o-ms-ooxml-realmente-pronto-quando-foi-aprovado/</guid>
<description><![CDATA[Dica de Leitura: Para os descrentes, a prova definitiva: O OpenXML ainda não estava (e não está) pro]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Dica de Leitura:</p>
<p><a href="http://homembit.com/2009/04/para-quem-ainda-nao-acredita-a-prova-definitiva-o-openxml-ainda-nao-estava-e-nao-esta-pronto.html" target="_blank"><strong>Para os descrentes, a prova definitiva: O OpenXML ainda não estava (e não está) pronto &#8211; homembit</strong></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[OpenXML SpreadsheetML Simple Spreadsheet Creation]]></title>
<link>http://drybridge.wordpress.com/2009/03/31/openxml-spreadsheetml-simple-spreadsheet-creation/</link>
<pubDate>Tue, 31 Mar 2009 16:26:51 +0000</pubDate>
<dc:creator>art colman</dc:creator>
<guid>http://drybridge.wordpress.com/2009/03/31/openxml-spreadsheetml-simple-spreadsheet-creation/</guid>
<description><![CDATA[OpenXML SpreadsheetML Simple Spreadsheet Creation Simple WinForms for the creation of an Excel Sprea]]></description>
<content:encoded><![CDATA[OpenXML SpreadsheetML Simple Spreadsheet Creation Simple WinForms for the creation of an Excel Sprea]]></content:encoded>
</item>
<item>
<title><![CDATA[Passing a Data Array to a Microsoft SQL Server Stored Procedure]]></title>
<link>http://thatdatalady.wordpress.com/2009/03/28/52/</link>
<pubDate>Sat, 28 Mar 2009 00:33:35 +0000</pubDate>
<dc:creator>Paula DiTallo</dc:creator>
<guid>http://thatdatalady.wordpress.com/2009/03/28/52/</guid>
<description><![CDATA[There is a probability of encountering the need to pass an array of data from a front end .NET/FLEX ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong></strong></p>
<p>There is a probability of encountering the need to pass an array of data from a front end .NET/FLEX application or WCF/SOA Web Service at some point during the development process for an application.  For example, perhaps you are developing an online order entry system which will require that multiple items from your application get written to the order header and order details tables.</p>
<p>There are a few ways to do this through T-SQL/stored procedures, but the two primary approaches are to:  (l)  create user functions that parse a delimiter to separate the elements in a string;  (2) use the XML features available in Microsoft SQL Server.</p>
<p>If you are using SQL Server 6.5/7.0,  the XML features won&#8217;t be available. so you&#8217;ll need to go the route of user defined functions.  This post does not address these methods, but <a title="xdevsoftwar.com" href="http://www.xdevsoftware.com/blog/post/SQL-String-Iterator.aspx" target="_blank">here is my favorite link</a> on the topic.</p>
<p>If you are using SQL Server 2000,  the tools available for use are the legacy<strong> OPENXML</strong> rowset provider and the system stored procedures: <strong>sp_xml_preparedocument</strong>,  <strong>sp_xml_removedocument</strong> .  In SQL Server 2005 and 2008, these tools still exist, however the preferred XML data type methods for these versions of SQL Sever are: nodes(), value(), and query().  Here are two excellent posts for anyone working with OPENXML (or data arrays) in SQL Server 2000:</p>
<p><a href="http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm" target="_blank">http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm</a></p>
<p><a href="http://www.mssqltips.com/tip.asp?tip=1609" target="_blank">http://www.mssqltips.com/tip.asp?tip=1609</a></p>
<p>In this practical Order Header/Order Detail example, I&#8217;ll be using the xml data type methods: value() and nodes().  To view the relational design pattern used for this example, Fernando Loranzo&#8217;s <strong><a href="http://www.edm2.com/0612/msql7.html" target="_blank">Introduction to Relational Database Design</a></strong> article illustrates the OrderHeader and OrderDetails tables with  Order and Order_Items tables.</p>
<p><strong>T-SQL/Stored Procedure</strong></p>
<p>This procedure accepts two basic parameters, the account id (<span style="color:#800000;">@AccountID</span>) of the customer and the product items/product quantities bound passed as an xml document  (<span style="color:#800000;">@OrderList</span>). For the OrderHeader table, the identity feature of SQL Server is invoked on an insert creating a unique OrderID. The OrderID is captured in the declared variable (<span style="color:#800000;">@OrderID</span>) for use when inserting the product/quantity data into the OrderDetails table. To do the insert, the sub-select uses the OrderList xml document (as <span style="color:#800000;">&#8216;D&#8217;</span>), drilling through the nodes (<span style="color:#800000;"><em>/Order/Item/Prod<span style="color:#000000;">) </span></em><span style="color:#000000;">to parse through the document, obtaining the values (e.g. </span></span><span style="color:#800000;"><em>D.element.value</em></span><span style="color:#800000;"><span style="color:#000000;">).</span></span></p>
<p><span style="color:#800000;"><span style="color:#000000;"><br />
</span></span></p>
<p><span style="color:#800000;"><em>create proc [dbo].[InsertOrder]<br />
(<br />
@OrderList xml,<br />
@AccountID int<br />
)</em></span></p>
<p><span style="color:#800000;"><em>as</em></span></p>
<p><span style="color:#800000;"><em>set nocount on</em></span></p>
<p><span style="color:#800000;"><em>declare @OrderID int<br />
declare @Today datetime</em></span></p>
<p><span style="color:#800000;"><em>set @Today = getDate()</em></span></p>
<p><span style="color:#800000;"><em>insert into [dbo].[OrderHeader]<br />
(CustAcct,OrderDate)<br />
values<br />
(@AccountID,@Today)</em></span></p>
<p><span style="color:#800000;"><em>set @OrderID = SCOPE_IDENTITY()</em></span></p>
<p><span style="color:#800000;"><em>insert into [dbo].[OrderDetail]<br />
(OrderID,ProdId,ProdQty)<br />
select<br />
@OrderID,<br />
D.element.value(&#8216;@ID&#8217;, &#8216;nvarchar(255)&#8217;) as ID,<br />
D.element.value(&#8216;@Qty&#8217;,'nvarchar(255)&#8217;) as Qty<br />
from @OrderList.nodes(&#8216;/Order/Item/Prod) as D(element)</em></span></p>
<p><strong><span style="color:#000000;">XML for the OrderList</span></strong></p>
<p><span style="color:#000000;">In order for the stored procedure InsertOrder to work, the xml which is passed (@OrderList)  is in the following format:<br />
</span></p>
<p><span style="color:#000000;"><span style="color:#993366;"><em>&#60;Order&#62;<br />
&#60;Item&#62;<br />
&#60;Prod ID=&#8221;60000&#8243; Qty=&#8221;200&#8243;&#62;&#60;/Prod&#62;<br />
&#60;/Item&#62;<br />
&#60;Item&#62;<br />
&#60;Prod ID=&#8221;60180&#8243; Qty=&#8221;1000&#8243;&#62;&#60;/Prod&#62;<br />
&#60;/Item&#62;<br />
&#60;/Order&#62;</em></span></span></p>
<p><strong><span style="color:#000000;"><span style="color:#993366;"><span style="color:#000000;">To test this stored procedure:</span></span></span></strong></p>
<p><span style="color:#000000;"><span style="color:#993366;"><span style="color:#000000;">Open a query window and type the execute statement, wrapping the OrderList xml in single quotes and the customer number/account id in single quotes (optional as AccountID is defined as an integer).<br />
</span></span></span></p>
<p><span style="color:#000000;"><span style="color:#993366;"><span style="color:#000000;"><strong>exec</strong> <strong><span style="color:#ff6600;">InsertOrder</span></strong><br />
<span style="color:#808000;">&#8216;&#60;Order&#62;<br />
&#60;Item&#62;<br />
&#60;Prod ID=&#8221;60000&#8243; Qty=&#8221;200&#8243;&#62;&#60;/Prod&#62;<br />
&#60;/Item&#62;<br />
&#60;Item&#62;<br />
&#60;Prod ID=&#8221;60180&#8243; Qty=&#8221;1000&#8243;&#62;&#60;/Prod&#62;<br />
&#60;/Item&#62;<br />
&#60;/Order&#62;&#8217;</span>,<span style="color:#008000;"> &#8216;<strong>222333</strong>&#8216;</span></span></span></span></p>
<p><span style="font-size:x-small;"><em><strong><span style="font-family:Arial,sans-serif;">Copyright © Paula DiTallo 2009 All Rights Reserved</span></strong></em></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[linux migration part I : membuka file docx (office2007) di open office.org 2.4]]></title>
<link>http://fierd.wordpress.com/2009/03/20/linux-migration-part-i-membuka-file-docx-office2007-di-open-officeorg-24/</link>
<pubDate>Fri, 20 Mar 2009 03:16:43 +0000</pubDate>
<dc:creator>fierd</dc:creator>
<guid>http://fierd.wordpress.com/2009/03/20/linux-migration-part-i-membuka-file-docx-office2007-di-open-officeorg-24/</guid>
<description><![CDATA[kemarin di kantor saia menyarankan big boz&nbsp; agar sebaiknya meninggalkan micro$ft opis.. kemudia]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>kemarin di kantor saia menyarankan big boz&#160; agar sebaiknya meninggalkan micro$ft opis.. kemudian beliau pun menyanggupi dengan catatan</p>
<blockquote><p>oke boleh aja pindah ke open office, tapi banyak dokum udah terlanjut dibuat dengan opis 2007 (*.docx), kalo open office bisa membukanya boleh saja..</p>
</blockquote>
<p>berarti cuma ada satu jalan&#8230; buka docx di open office..!!!</p>
<p>dengan gaga berani saia membuka open office yang udah lengket di hardy heron..</p>
<p>yup open office 2.4,, belum support ke docx .. .:(</p>
<p>setelah googling sana sini.. nyari bahan buat tambalan.. akhirnya nemu juga untuk platform debian / ubuntu&#8230;</p>
<p>dengan senyum manis gue buka console..</p>
<p>kita unduh dulu <code>OdfConverter</code></p>
<blockquote><p>wget http://blog.mypapit.net/imej/odf_filter.tar.bz2</p>
</blockquote>
<p>setelah di ekstrak&#8230; akan muncul 4 file yang keren2..</p>
<p>MOOXFilter_cpp.xcu, MOOXTypeDetection.xcu, OdfConverter and README.txt</p>
<p>masukkan kata2 mutiara dari mbah papit</p>
<blockquote><p><code>sudo cp OdfConverter /usr/lib/openoffice/program/</code></p>
<p>sudo cp MOOXFilter_cpp.xcu usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Filter/</p>
<p>sudo cp MOOXTypeDetection.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Types/</p>
</blockquote>
<p>yip yip.. sepertinya berjalan baik baik saja&#8230; setelah open offie kita restart&#8230;</p>
<p>adakadabra&#8230; si docx lahir dengan sehat&#8230;</p>
<p><img src="http://blog.mypapit.net/wp-content/uploads/2007/09/openoffice_docx.png" alt=""></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[Word] Colocar el cursor en la primera p&aacute;gina]]></title>
<link>http://mspnor.wordpress.com/2009/02/23/word-colocar-el-cursor-en-la-primera-pgina/</link>
<pubDate>Mon, 23 Feb 2009 23:14:14 +0000</pubDate>
<dc:creator>norber</dc:creator>
<guid>http://mspnor.wordpress.com/2009/02/23/word-colocar-el-cursor-en-la-primera-pgina/</guid>
<description><![CDATA[Aquí un Tip, para colocar el cursor el inicio del Documento. Esto lo hacemos con una sola línea de c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Aquí un Tip, para colocar el cursor el inicio del Documento. Esto lo hacemos con una sola línea de código que es:</p>
<pre style="width:489px;height:42px;" class="code">Word.Selection.HomeKey(Microsoft.Office.Interop.Word.WdUnits.wdStory, <span style="color:blue;">False</span>)</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>El segundo parámetro nos indica si vamos a seleccionar el texto, si lo colocamos en True, selecciona desde el punto donde se encontraba el puntero hasta el inicio.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b558abbc-6c80-4bb3-bbf1-0236fa2f81e2" class="wlWriterEditableSmartContent">Etiquetas de Technorati: <a href="http://technorati.com/tags/Office+2007" rel="tag">Office 2007</a>,<a href="http://technorati.com/tags/Word" rel="tag">Word</a>,<a href="http://technorati.com/tags/Tips" rel="tag">Tips</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[Access] Obtener el tipo de datos y Formato de un campo en una Tabla]]></title>
<link>http://mspnor.wordpress.com/2009/02/21/access-obtener-el-tipo-de-datos-y-formato-de-un-campo-en-una-tabla/</link>
<pubDate>Sat, 21 Feb 2009 18:03:45 +0000</pubDate>
<dc:creator>norber</dc:creator>
<guid>http://mspnor.wordpress.com/2009/02/21/access-obtener-el-tipo-de-datos-y-formato-de-un-campo-en-una-tabla/</guid>
<description><![CDATA[Aquí un tip más si quieren saber el tipo de datos lo hacen con esta instrucción: miBD.TableDefs(]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Aquí un tip más si quieren saber el tipo de datos lo hacen con esta instrucción:</p>
<pre class="code">miBD.TableDefs(<span style="color:#a31515;">&#34;Alumnos&#34;</span>).Fields(<span style="color:#a31515;">&#34;ID&#34;</span>).Type</pre>
<p>El objeto miBD es de tipo data base que hereda de la clase DAO, para esto debes agregar una referencia al proyecto y después asignarle el tipo de datos de la Aplicacción Access más o menos así:</p>
<pre class="code">miBD = Access.CurrentDb</pre>
<p>Para saber el formato de tipo de datos es con la siguiente instrucción:</p>
<pre class="code">miBD.TableDefs(<span style="color:#a31515;">&#34;Alumnos&#34;</span>).Fields(<span style="color:#a31515;">&#34;ID&#34;</span>).Properties(<span style="color:#a31515;">&#34;Format&#34;</span>).Value</pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste">Espero</a> que les sea de utilidad Saludos..</p>
<p>@nor</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:58cc6860-ed43-4309-bdfd-12dbb6a1f9f5" class="wlWriterEditableSmartContent">Etiquetas de Technorati: <a href="http://technorati.com/tags/Office+2007" rel="tag">Office 2007</a>,<a href="http://technorati.com/tags/Access" rel="tag">Access</a>,<a href="http://technorati.com/tags/Formato" rel="tag">Formato</a>,<a href="http://technorati.com/tags/Tipo+de+datos" rel="tag">Tipo de datos</a>,<a href="http://technorati.com/tags/VSTO" rel="tag">VSTO</a>,<a href="http://technorati.com/tags/VBA" rel="tag">VBA</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[Word] Saber en que p&aacute;gina esta el cursor en un Documento]]></title>
<link>http://mspnor.wordpress.com/2009/02/09/word-saber-en-que-pgina-esta-el-cursor-en-un-documento/</link>
<pubDate>Mon, 09 Feb 2009 22:06:40 +0000</pubDate>
<dc:creator>norber</dc:creator>
<guid>http://mspnor.wordpress.com/2009/02/09/word-saber-en-que-pgina-esta-el-cursor-en-un-documento/</guid>
<description><![CDATA[Que tal, siguiendo con estos mini ejemplos de programación en Office, mientras pasa el tiempo, y en ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Que tal, siguiendo con estos mini ejemplos de programación en Office, mientras pasa el tiempo, y en base a una pregunta eh aquí el como identificar en que página se encuentra el cursor en un Documento de Word.</p>
<p>El ejemplo siguiente es muy sencillo pero hice un menú para que pudieran apreciar el funcionamiento. Contiene un menú con las opciones:</p>
<ol>
<li>Abrir un Documento</li>
<li>Mover el Cursor</li>
<li>Cerrar Documento</li>
</ol>
<p>El código es el siguiente.</p>
<pre style="width:477px;height:1226px;" class="code"><span style="color:blue;">Imports </span>Word = Microsoft.Office.Interop.Word

<span style="color:blue;">Module </span>Module1

    <span style="color:blue;">Public </span>word <span style="color:blue;">As </span>Word.Application
    <span style="color:blue;">Sub </span>Main()
        word = <span style="color:blue;">New </span>Word.Application
        Menu()
        <span style="color:blue;">Dim </span>valor <span style="color:blue;">As Integer
        Do
            Try
                </span>valor = <span style="color:blue;">Integer</span>.Parse(Console.ReadLine())
            <span style="color:blue;">Catch </span>ex <span style="color:blue;">As </span>Exception
                Console.WriteLine(ex.Message)
            <span style="color:blue;">End Try
            </span>Proceso(valor)
            Console.Clear()
            Menu()
        <span style="color:blue;">Loop While </span>valor &#60;&#62; 4

    <span style="color:blue;">End Sub

    Public Sub </span>Menu()
        Console.WriteLine(<span style="color:#a31515;">&#34;1.- Abrir Documento&#34;</span>)
        Console.WriteLine(<span style="color:#a31515;">&#34;2.- Mover Cursor&#34;</span>)
        Console.WriteLine(<span style="color:#a31515;">&#34;3.- Cerrar el Documento&#34;</span>)
        Console.WriteLine(<span style="color:#a31515;">&#34;4 Cerrar Aplicación&#34;</span>)
        Console.Write(<span style="color:#a31515;">&#34;Selecciona alguna Opción :&#34;</span>)
    <span style="color:blue;">End Sub

    Public Sub </span>AbrirDocumento(<span style="color:blue;">ByVal </span>val <span style="color:blue;">As Boolean</span>)

        <span style="color:blue;">If </span>val = <span style="color:blue;">False Then
            </span>word.Documents.Open(<span style="color:#a31515;">&#34;C:\Demo.docx&#34;</span>)
            word.Application.Visible = <span style="color:blue;">True
        Else
            </span>word = word.ActiveDocument.Application
            <span style="color:blue;">For </span>i <span style="color:blue;">As Integer </span>= 1 <span style="color:blue;">To </span>word.Selection.Information _
                (Microsoft.Office.Interop.Word.WdInformation.wdNumberOfPagesInDocument)
                <span style="color:blue;">If </span>word.Selection.Information _
                (Microsoft.Office.Interop.Word.WdInformation.wdActiveEndPageNumber) = i <span style="color:blue;">Then
                    </span>Console.WriteLine(<span style="color:#a31515;">&#34;El Cursor esta en la página: {0} &#34;</span>, i)
                <span style="color:blue;">End If
            Next
        End If
    End Sub

    Public Sub </span>CerrarDocumento()

        <span style="color:blue;">For Each </span>doc <span style="color:blue;">As </span>Word.Document <span style="color:blue;">In </span>word.Documents
            doc.Close(SaveChanges:=<span style="color:blue;">False</span>)
        <span style="color:blue;">Next
        </span>word.Application.Quit()

    <span style="color:blue;">End Sub

    Public Sub </span>Proceso(<span style="color:blue;">ByVal </span>id <span style="color:blue;">As Integer</span>)
        <span style="color:blue;">Select Case </span>id
            <span style="color:blue;">Case </span>1
                AbrirDocumento(<span style="color:blue;">False</span>)
            <span style="color:blue;">Case </span>2
                Console.Clear()
                AbrirDocumento(<span style="color:blue;">True</span>)
                Console.ReadLine()
            <span style="color:blue;">Case </span>3
                CerrarDocumento()
        <span style="color:blue;">End Select
    End Sub

End Module</span></pre>
<p>Explicando el Código.</p>
<p>El primer método es el de Menú, que solo contiene las opciones que se muestran en pantalla.</p>
<p>Lugo esta el método de Abrir un documento, que consta de 2 etapas en base a una condición sencilla, recibe un variable booleana que según el valor es la acción que realiza. Con la opción uno solo abre el documento llamad Demo.docx que esta en la unidad C. En la opción 2 muestra un mensaje en la consola que indica que página esta el puntero.</p>
<p>El método de Cerrar el documento. (Sin comentarios)</p>
<p>Por ultimo el de proceso que evalúa que es lo que el usuario eligió.</p>
<p>La parte importante de este post es el saber como identificar en que página esta el puntero y esto se encuentra en el método AbrirDocumento y el código es este:</p>
<p>&#160;</p>
<pre style="width:475px;height:135px;" class="code"><span style="color:blue;">For </span>i <span style="color:blue;">As Integer </span>= 1 <span style="color:blue;">To </span>word.Selection.Information _
                (Microsoft.Office.Interop.Word.WdInformation.wdNumberOfPagesInDocument)
                <span style="color:blue;">If </span>word.Selection.Information _
                (Microsoft.Office.Interop.Word.WdInformation.wdActiveEndPageNumber) = i <span style="color:blue;">Then
                    </span>Console.WriteLine(<span style="color:#a31515;">&#34;El Cursor esta en la página: {0} &#34;</span>, i)
                <span style="color:blue;">End If
            Next</span></pre>
<p>Que recorremos la cantidad total de páginas del documento y obtenemos en que página esta puntero con la instrucción:</p>
<pre style="width:493px;height:71px;" class="code">word.Selection.Information _
                (Microsoft.Office.Interop.Word.WdInformation.wdActiveEndPageNumber)</pre>
<p>Recuerden que para que funcione deben tener el archivo llama Demo.docx en su unidad D o colocar la ruta en donde se encuentre. Saludos.</p>
<p>@nor</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:16df1b22-ebea-4982-af01-c961878eee5f" class="wlWriterEditableSmartContent">Etiquetas de Technorati: <a href="http://technorati.com/tags/Office" rel="tag">Office</a>,<a href="http://technorati.com/tags/Microsoft+Office+2007" rel="tag">Microsoft Office 2007</a>,<a href="http://technorati.com/tags/Word" rel="tag">Word</a>,<a href="http://technorati.com/tags/Ejemplos" rel="tag">Ejemplos</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[Word] Cerrar cualquier documento de Word de cualquier instancia]]></title>
<link>http://mspnor.wordpress.com/2009/02/04/word-cerrar-cualquier-documento-de-word-de-cualquier-instancia/</link>
<pubDate>Wed, 04 Feb 2009 22:19:38 +0000</pubDate>
<dc:creator>norber</dc:creator>
<guid>http://mspnor.wordpress.com/2009/02/04/word-cerrar-cualquier-documento-de-word-de-cualquier-instancia/</guid>
<description><![CDATA[Ya es el tercer post sobre esto, y a petición de un comentario de mi amigo David. Solo una pequeña m]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ya es el tercer post sobre esto, y a petición de un comentario de mi amigo David. Solo una pequeña modificación para cerrar los documentos de Word. Les platico a lo que se refiere y porque publico este post. Resulta que trabajamos con objetos de Word, validación de eventos sobre el Office 2007 y muchas veces tenemos la necesidad de reiniciar una aplicación de Office sin guardar cambios, pero resulta que sino controlamos bien la liberación de los recursos o de los objetos nos puede traer varios errores. </p>
<p>Lo que me preguntaron es como cerrar todos las instancias de Word, pero sin hacerlo desde los procesos como lo menciono en otro <a href="http://mspnor.wordpress.com/2009/02/04/word-cerrar-todas-las-instancias-de-word-en-el-sistema/" target="_blank">post</a>, es decir que pasa si abro un archivo cualquiera y después creo un instancia (desde código) y necesito validar no se… que se cierren todos los documentos, o que se guarden con nombres específicos, que se yo.</p>
<p>En el siguiente ejemplo cerramos absolutamente todos los documentos sin importar la instancia.</p>
<pre class="code"><span style="color:blue;">Imports </span>Word = Microsoft.Office.Interop.Word

<span style="color:blue;">Module </span>Module1

    <span style="color:blue;">Sub </span>Main()

        <span style="color:green;">'Variables
        </span><span style="color:blue;">Dim </span>AppWord <span style="color:blue;">As New </span>Word.Global
        <span style="color:blue;">Dim </span>doc <span style="color:blue;">As </span>Word.Document

        <span style="color:green;">'Aquí cerramos todos los documentos sin guardar cambios
        </span><span style="color:blue;">For Each </span>doc <span style="color:blue;">In </span>AppWord.Documents
            doc.Close(SaveChanges:=<span style="color:blue;">False</span>)
        <span style="color:blue;">Next

        </span>AppWord.Application.Quit(SaveChanges:=<span style="color:blue;">False</span>)

    <span style="color:blue;">End Sub

End Module</span></pre>
<p>Si se dan cuenta es muy similar a lo que publique en el post de cerrar los documentos a partir de una instancia, pero&#160; aquí hacemos referencia a la aplicación Global, esa es la diferencia para poder cerrar todos los documentos de Word que se encuentren abiertos en nuestro Sistema.</p>
<p>Para ver que funciona, prueben abriendo varios archivos de Word y luego ejecuten el programa, verán que se cierran todos sin guardar cambios.</p>
<p>Saludos.</p>
<p>@nor</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:634ce4de-f91f-4b53-be9f-68dd54235609" class="wlWriterEditableSmartContent">Etiquetas de Technorati: <a href="http://technorati.com/tags/Office" rel="tag">Office</a>,<a href="http://technorati.com/tags/Microsoft+Office+2007" rel="tag">Microsoft Office 2007</a>,<a href="http://technorati.com/tags/Office+2007" rel="tag">Office 2007</a>,<a href="http://technorati.com/tags/Word" rel="tag">Word</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[Word] Como cerrar los documentos de Word a partir de una instancia]]></title>
<link>http://mspnor.wordpress.com/2009/02/04/word-como-cerrar-los-documentos-de-word-a-partir-de-una-instancia/</link>
<pubDate>Wed, 04 Feb 2009 19:02:44 +0000</pubDate>
<dc:creator>norber</dc:creator>
<guid>http://mspnor.wordpress.com/2009/02/04/word-como-cerrar-los-documentos-de-word-a-partir-de-una-instancia/</guid>
<description><![CDATA[En el post anterior vimos como cerrar los objetos de Word en base a la lista del proceso del Sistema]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>En el post anterior vimos como cerrar los objetos de Word en base a la lista del proceso del Sistema. En este ejemplo vamos a ver como cerrarlos a partir de una instancia, esto lo podemos usar cuando trabajamos con objetos de Word para verificar que el usuario haga algo o que se yo, pero aquí el ejemplo.</p>
<pre style="width:481px;height:484px;" class="code"><span style="color:blue;">Imports </span>Word = Microsoft.Office.Interop.Word

<span style="color:blue;">Module </span>Module1

    <span style="color:blue;">Sub </span>Main()

        <span style="color:green;">'Variables
        </span><span style="color:blue;">Dim </span>AppWord <span style="color:blue;">As New </span>Word.Application
        <span style="color:blue;">Dim </span>doc <span style="color:blue;">As </span>Word.Document

        <span style="color:green;">'Agregamos cuatro documentos en blanco y escribimos un texto
        </span><span style="color:blue;">For </span>i <span style="color:blue;">As Integer </span>= 0 <span style="color:blue;">To </span>4
            AppWord.Documents.Add()
            AppWord.Application.WindowState = Word.WdWindowState.wdWindowStateNormal
            AppWord.Visible = <span style="color:blue;">True
            </span>AppWord.ActiveDocument.Sections(1).Range.Text = <span style="color:#a31515;">&#34;Mi Documento numero:  &#34; </span>&#38; i
        <span style="color:blue;">Next

        </span><span style="color:green;">'Aquí cerramos todos los documentos sin guardar cambios
        </span><span style="color:blue;">For Each </span>doc <span style="color:blue;">In </span>AppWord.Documents
            doc.Close(SaveChanges:=<span style="color:blue;">False</span>)
        <span style="color:blue;">Next
        </span>AppWord.Quit(SaveChanges:=<span style="color:blue;">False</span>)

    <span style="color:blue;">End Sub

End Module</span></pre>
<p>Explicando el código.</p>
<p>Primero creamos una instancia de Word y un documento para poder hacer el recorrido por el arreglo de Documentos abiertos.</p>
<p>En el For creamos 5 documentos maximizamos la ventana y la mostramos, al mismo&#160; tiempo que agregamos un texto al mismo.</p>
<p>Después por medio del For each recorremos todos los documentos que creamos (incluso sirve si los abrimos), los cerramos sin guardar cambios.</p>
<p>Por ultimo cerramos nuestra instancia de Word.</p>
<p>Espero que les sea de utilidad.</p>
<p>Saludos.</p>
<p>@nor.</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4330df8f-8369-4564-a241-cc6dd7fe81bd" class="wlWriterEditableSmartContent">Etiquetas de Technorati: <a href="http://technorati.com/tags/Office" rel="tag">Office</a>,<a href="http://technorati.com/tags/Office+2007" rel="tag">Office 2007</a>,<a href="http://technorati.com/tags/Word" rel="tag">Word</a>,<a href="http://technorati.com/tags/Microsoft+Office+2007" rel="tag">Microsoft Office 2007</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[Word] Cerrar todas las instancias de Word en el Sistema]]></title>
<link>http://mspnor.wordpress.com/2009/02/04/word-cerrar-todas-las-instancias-de-word-en-el-sistema/</link>
<pubDate>Wed, 04 Feb 2009 16:47:00 +0000</pubDate>
<dc:creator>norber</dc:creator>
<guid>http://mspnor.wordpress.com/2009/02/04/word-cerrar-todas-las-instancias-de-word-en-el-sistema/</guid>
<description><![CDATA[Muchas veces tenemos la necesidad de cerrar o tronar los procesos de un objeto de Office, en este ca]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Muchas veces tenemos la necesidad de cerrar o tronar los procesos de un objeto de Office, en este caso de Word. El siguiente ejemplo muestra como hacer.</p>
<pre class="code"><span style="color:blue;">Imports </span>System.Diagnostics

<span style="color:blue;">Module </span>Module1

    <span style="color:blue;">Sub </span>Main()
        <span style="color:blue;">Dim </span>procs() = Process.GetProcesses
        <span style="color:blue;">Dim </span>pr <span style="color:blue;">As </span>Process
        <span style="color:blue;">For Each </span>pr <span style="color:blue;">In </span>procs
            <span style="color:blue;">If </span>(pr.ProcessName = <span style="color:#a31515;">&#34;WINWORD&#34;</span>) <span style="color:blue;">Then
                </span>pr.Kill()
            <span style="color:blue;">End If
        Next

    End Sub

End Module</span></pre>
<p>Utilizamos el nombre de espacios <strong>Diagnostics</strong>, que nos permite obtener los procesos que se están ejecutando en el Sistema. lo que hacemos es obtener un arreglo de dichos procesos para después recorrerlos e identificar cuales son los que queremos tronar. Por ultimo ejecutamos el método <strong>Kill </strong>el cual detiene inmediatamente el proceso asociado.</p>
<p>Espero que les sea de utilidad, y como se observa en el ejemplo podemos aplicar esto a cualquier proceso, e incluso ejecutar algún otro que no este corriendo.</p>
<p>Saludos.</p>
<p>&#160;</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:38246ee0-81b5-4f1c-90e9-b2930a644dfc" class="wlWriterEditableSmartContent">Etiquetas de Technorati: <a href="http://technorati.com/tags/Word" rel="tag">Word</a>,<a href="http://technorati.com/tags/Office" rel="tag">Office</a>,<a href="http://technorati.com/tags/Microsoft+Office" rel="tag">Microsoft Office</a>,<a href="http://technorati.com/tags/Office+2007" rel="tag">Office 2007</a>,<a href="http://technorati.com/tags/.NET" rel="tag">.NET</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[VSTO] Manejando Estilos de texto en Word]]></title>
<link>http://mspnor.wordpress.com/2009/01/28/vsto-manejando-estilos-de-texto-en-word/</link>
<pubDate>Wed, 28 Jan 2009 00:16:41 +0000</pubDate>
<dc:creator>norber</dc:creator>
<guid>http://mspnor.wordpress.com/2009/01/28/vsto-manejando-estilos-de-texto-en-word/</guid>
<description><![CDATA[Este es el primer post de una serie (espero que sea larga) en donde hablare de como trabajar un poco]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Este es el primer post de una serie (espero que sea larga) en donde hablare de como trabajar un poco con VSTO desde .NET, realmente son ejemplos sencillos pero espero que les sean de utilidad sobre todo cuando trabajan con documentos de Office y necesitan optimizar algunos procesos. Iniciamos con el los Estilos en Word</p>
<p><strong>¿Cómo asignar un Estilo rápido a un párrafo en Word?</strong></p>
<p> <a href="http://11011.net/software/vspaste"></a>
<pre class="code" style="width:499px;height:215px;"><span style="color:blue;">Public Sub </span>AsignarEstilo(<span style="color:blue;">ByVal </span>doc <span style="color:blue;">As </span>Word.Document, <span style="color:blue;">ByVal </span>nomEstiloRapido <span style="color:blue;">As String</span>, <span style="color:blue;">ByVal </span>numParrafo <span style="color:blue;">As Integer</span>)
        <span style="color:blue;">Dim </span>s <span style="color:blue;">As </span>Word.Style

        <span style="color:blue;">For Each </span>s <span style="color:blue;">In </span>doc.Styles
            <span style="color:blue;">If </span>s.QuickStyle <span style="color:blue;">Then
                If </span>s.NameLocal = nomEstiloRapido <span style="color:blue;">Then
                    </span>doc.Paragraphs(numParrafo).Range.Style = s
                <span style="color:blue;">End If
            End If
        Next
    End Sub</span></pre>
<p>Explicando el método. Recorremos todo el arreglo de estilos con los que cuenta un Documento de Word, utilizando la propiedad QuickStyle para identificar los estilos rápidos, como el método recibe el nombre del Estilo rápido lo comparamos y para asignarlo al párrafo que le indicamos cuando llamamos al método.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:52ab535a-eb5a-49c4-bf15-41069c2a8d96" style="display:inline;float:none;margin:0;padding:0;">Etiquetas de Technorati: <a href="http://technorati.com/tags/VSTO" rel="tag">VSTO</a>,<a href="http://technorati.com/tags/Office" rel="tag">Office</a>,<a href="http://technorati.com/tags/Office+2007" rel="tag">Office 2007</a>,<a href="http://technorati.com/tags/VS+2008" rel="tag">VS 2008</a>,<a href="http://technorati.com/tags/Word" rel="tag">Word</a></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Microsoft Office a precio especial s&oacute;lo para Universitarios]]></title>
<link>http://mspnor.wordpress.com/2009/01/22/microsoft-office-a-precio-especial-slo-para-universitarios/</link>
<pubDate>Thu, 22 Jan 2009 14:54:26 +0000</pubDate>
<dc:creator>norber</dc:creator>
<guid>http://mspnor.wordpress.com/2009/01/22/microsoft-office-a-precio-especial-slo-para-universitarios/</guid>
<description><![CDATA[Si aun no cuentas con la versión original de Microsoft Office Ultímate 2007, esta es tu oportunidad ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><table class="fondo-blanco" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>Si aun no cuentas con la versión original de Microsoft Office Ultímate 2007, esta es tu oportunidad aprovecha los descuentos que ofrecen y descárgalo por solo $499         <br />&#160; <br /> <br />
<table cellspacing="0" width="500" align="center" border="0">
<tbody>
<tr>
<td class="fondo-gris">
<table cellspacing="0" width="100%" align="center" border="0">
<tbody>
<tr>
<td class="fondo-blanco">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td colspan="3" height="10"><img height="10" alt="" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/fondo1.gif" width="486" /></td>
</tr>
<tr>
<td width="138"><img height="35" alt="" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/logo.gif" width="138" /></td>
<td><img height="35" alt="" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/fondo2.gif" width="269" /></td>
<td valign="middle" align="center" width="79"><img height="1" alt="" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/trans.gif" width="1" /></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td><img height="1" alt="" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/trans.gif" width="1" /></td>
</tr>
<tr>
<td valign="top"><img height="270" alt="" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/top_office.jpg" width="486" /></td>
</tr>
<tr>
<td><img height="85" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/bajada.jpg" width="486" /></td>
</tr>
<tr>
<td><img height="150" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/call.jpg" width="486" border="0" /></td>
</tr>
<tr>
<td class="txt" bgcolor="#f9b419">Para mas información comunícate al 52 67 21 12 opción 1 ó 01 800 849 9998</td>
</tr>
<tr>
<td class="txt" align="center" bgcolor="#f9b419"><img height="48" src="http://www.microsoft.com/mexico/emails/08/oem/imagesoffice/logo.jpg" width="150" /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5da4821d-10a9-4902-bb94-06fe66ceca62" style="display:inline;float:none;margin:0;padding:0;">Etiquetas de Technorati: <a href="http://technorati.com/tags/Office+2007" rel="tag">Office 2007</a>,<a href="http://technorati.com/tags/Microsoft+Office+2007" rel="tag">Microsoft Office 2007</a>,<a href="http://technorati.com/tags/Microsoft+Office+Ultimate+2007" rel="tag">Microsoft Office Ultimate 2007</a></div>
</td>
</tr>
</tbody>
</table>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[¿OpenXML, un eslabón mas a la Cadena? ]]></title>
<link>http://raulespinola.wordpress.com/2009/01/12/%c2%bfopenxml-un-eslabon-mas-a-la-cadena/</link>
<pubDate>Mon, 12 Jan 2009 07:44:02 +0000</pubDate>
<dc:creator>raulespinola</dc:creator>
<guid>http://raulespinola.wordpress.com/2009/01/12/%c2%bfopenxml-un-eslabon-mas-a-la-cadena/</guid>
<description><![CDATA[Empecemos a Usar Open Office: Como muchos de nosotros sabemos Microsoft ha ganado para establecer un]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><em><strong> Empecemos a Usar Open Office:</strong></em></p>
<p><em><strong><a href="http://download.openoffice.org/index.html"></a><a href="http://download.openoffice.org/index.html"><img class="alignleft" src="http://www.alejandrox.com/wp-content/2008/03/openoffice.png" alt="" width="256" height="192" /></a><br />
</strong></em></p>
<p>Como muchos de nosotros sabemos Microsoft ha ganado para establecer un nuevo formato denominado OpenXML (no se QUE puede tener de abierto) pero la nueva ISO ya esta definida.</p>
<p><em><strong>El Objetivo de este post es que empecemos a animarnos a utilizar herramientas libres y no necesariamente estoy hablando de Linux, sino de empezar a utilizar por ejemplo Open Office, seguro ahora ustedes dirán que las Herramientas de Microsoft son mejores por ser pagas y donde la mayoría de nosotros teníamos que creackerlas o conseguir un serial trucho, bueno la idea es empezar a legalizarnos y liberarnos de los formatos, estándares y programas de microsoft y empezar a probar otras aplicaciones ofimáticas donde no tengamos que guardar nuestros documentos en raros formatos como docx y tampoco tengamos que preocuparnos por actualizar el crack cada mes.</strong></em></p>
<p><img class="aligncenter" src="http://www.openxml.info/images/banners/bannerooxmlnoapto.gif" alt="" width="468" height="60" /></p>
<p><em><strong>Aca les dejo algunas razones de la dudosa libertad de OpenXML:</strong></em></p>
<p><strong><span style="font-size:small;">1-Ya hay un estándar, ISO 26300, llamado Open Document Format (ODF)</span></strong><span style="font-size:small;">: un doble estándar supondrá incertidumbre, confusión y un coste añadido para la industria, gobiernos y ciudadanos.;</span></p>
<p><strong>2- No hay ninguna implementación de referencia de la especificación de OOXML</strong>: Microsoft Office 2007 produce una versión especial de OOXML que no cumple con la especificación de OOXML propuesta en ISO;</p>
<p style="margin-bottom:0;"><strong>3- En el documento de especificación falta información</strong> como, por ejemplo, cómo implementar un “<strong>autoSpaceLikeWord95</strong>” o un “<strong>useWord97LineBreakRules</strong>”;</p>
<p style="margin-bottom:0;"><strong>4- Más del 10% de los ejemplos de su especificación no validan</strong> la conformidad con XML;</p>
<p style="margin-bottom:0;">No existe garantía alguna para que cualquiera pueda implementar parcial o totalmente la especificación de OOXML sin arriesgarse a que <strong>Microsoft le exija daños y perjuicios por infracción de patentes o el pago de licencias de patentes</strong>;</p>
<p style="margin-bottom:0;">4- Esta <strong>propuesta de estándar entra en conflicto con otros estándares ISO</strong>, como ISO 8601 (representación de fechas y tiempos), ISO 639 (códigos de representación de nombre e idiomas) o ISO/IEC 10118-3 (funciones hash de criptografía);</p>
<p style="margin-bottom:0;">5- Hay un <strong>error en la especificación del fichero de formatos de hoja de cálculo que impide introducir cualquier fecha previa al año 1900</strong>. Esto es un error que se arrastra desde las obsoletas versiones de 16bits de la aplicación MS-Office;</p>
<p>6- Esta propuesta de estándar no <strong>ha sido creada</strong> aunando la experiencia y mejores prácticas de todas las partes interesadas (tales como productores, distribuidores, consumidores, usuarios y reguladores), sino <strong>por Microsoft en solitario</strong>.</p>
<p>Descargate Open Office pinchando en la Imagen:</p>
<p><em><strong><a href="http://download.openoffice.org/index.html"><img class="aligncenter size-full wp-image-515" title="aaaacsuedqkaaaaaaa0xpw" src="http://raulespinola.wordpress.com/files/2009/01/aaaacsuedqkaaaaaaa0xpw.png" alt="aaaacsuedqkaaaaaaa0xpw" width="128" height="58" /></a></strong></em></p>
<address><a href="http://blogs.technet.com/joseantoniobarriga/archive/2007/08/24/es-open-xml-un-buen-est-ndar.aspx"><span style="font-size:small;">¿Es Open XML un buen estándar?</span></a></address>
<address><a href="http://blogs.technet.com/joseantoniobarriga/archive/2007/08/24/es-open-xml-un-buen-est-ndar.aspx">http://blogs.technet.com/joseantoniobarriga/archive/2007/08/24/es-open-xml-un-buen-est-ndar.aspx</a></address>
<address class="western"><a href="http://es.wikipedia.org/wiki/Microsoft_Office_Open_XML"><span style="font-size:small;">Microsoft Office Open XML</span></a></address>
<address><a href="http://es.wikipedia.org/wiki/Microsoft_Office_Open_XML">http://es.wikipedia.org/wiki/Microsoft_Office_Open_XML</a></address>
<address class="western"><span style="font-size:small;">Razones por las que Open XML, ha obtenido la aprobación de ISO (según Microsoft)</span></address>
<address><a href="http://www.microsoft.com/spain/interop/xml/default.mspx">http://www.microsoft.com/spain/interop/xml/default.mspx</a></address>
<address><a href="http://www.stewart.es/general/que-es-office-open-ooxml-de-microsoft.jsp" target="_blank">Microsoft OfficeOpen XML &#8211; OOXML</a><br />
<a href="http://www.stewart.es/software/que-es-opendocument.jsp" target="_blank">OpenDocument</a><br />
<a href="http://www.noooxml.org/petition-es/" target="_blank">Dile No Al formato OOXML</a></address>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[OpenXML no es estándar]]></title>
<link>http://tr3sblogmaniacos.wordpress.com/2009/01/11/openxml-no-es-estandar/</link>
<pubDate>Sun, 11 Jan 2009 08:54:39 +0000</pubDate>
<dc:creator>Tr3s Blogmaniacos</dc:creator>
<guid>http://tr3sblogmaniacos.wordpress.com/2009/01/11/openxml-no-es-estandar/</guid>
<description><![CDATA[Un estándar debe estar totalmente documentado públicamente. Además, su proceso de estandarización (E]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="aligncenter size-full wp-image-441" title="noaptoparaiso-117x100" src="http://tr3sblogmaniacos.wordpress.com/files/2009/01/noaptoparaiso-117x100.jpg" alt="noaptoparaiso-117x100" width="117" height="100" /></p>
<p>Un estándar debe estar totalmente documentado públicamente. Además, su proceso de estandarización (ECMA) debería haber garantizado que todas las patentes de los proponentes del mismo fueran desveladas y licenciadas como mínimo en términos RAND. Finalmente, es necesario que una propuesta de estándar ISO cumpla y no contradiga los estándares ISO ya preexistentes para no obligar a &#8220;reinventar la rueda&#8221;. Office OpenXML no cumple ninguna de esas condiciones.</p>
<p>Visita el enlace:</p>
<p>http://www.openxml.info/</p>
<p><img class="aligncenter size-medium wp-image-442" title="bannerooxmlnoapto" src="http://www.openxml.info/images/banners/bannerooxmlnoapto.gif" alt="bannerooxmlnoapto" width="300" height="38" /></p>
<p>Dile NO al formato de Microsoft Office como estándar ISO</p>
<p>http://www.noooxml.org/petition-es/</p>
<p><!--more--></p>
<p>Solicito a los miembros del comité nacional de ISO que voten &#8220;NO&#8221; a ISO DIS 29500 (formato documental Office OpenXML, OOXML) y aporto las siguientes razones principales:</p>
<p> </p>
<li><strong>Ya hay un estándar, ISO 26300, llamado Open Document Format (ODF)</strong>: un doble estándar supondrá incertidumbre, confusión y un coste añadido para la industria, gobiernos y ciudadanos.;</li>
<li><strong>No hay ninguna implementación de referencia de la especificación de OOXML</strong>: Microsoft Office 2007 produce una versión especial de OOXML que no cumple con la especificación de OOXML propuesta en ISO;</li>
<li><strong>En el documento de especificación falta información</strong> como, por ejemplo, cómo implementar un “<strong>autoSpaceLikeWord95</strong>” o un “<strong>useWord97LineBreakRules</strong>”;</li>
<li><strong>Más del 10% de los ejemplos de su especificación no validan</strong>la conformidad con XML;</li>
<li>No existe garantía alguna para que cualquiera pueda implementar parcial o totalmente la especificación de OOXML sin arriesgarse a que <strong>Microsoft le exija daños y perjuicios por infracción de patentes o el pago de licencias de patentes</strong>;</li>
<li>Esta <strong>propuesta de estándar entra en conflicto con otros estándares ISO</strong>, como ISO 8601 (representación de fechas y tiempos), ISO 639 (códigos de representación de nombre e idiomas) o ISO/IEC 10118-3 (funciones hash de criptografía);</li>
<li>1.Hay un <strong>error en la especificación del fichero de formatos de hoja de cálculo que impide introducir cualquier fecha previa al año 1900</strong>. Esto es un error que se arrastra desde las obsoletas versiones de 16bits de la aplicación MS-Office;</li>
<li>Esta propuesta de estándar no <strong>ha sido creada</strong> aunando la experiencia y mejores prácticas de todas las partes interesadas (tales como productores, distribuidores, consumidores, usuarios y reguladores), sino <strong>por Microsoft en solitario</strong></li>
</div>]]></content:encoded>
</item>

</channel>
</rss>
