Welcome – First Post

As I mentioned on my MSDN blog, January 21, 2011 will be my last day as a Microsoft employee. I am shutting down the MSDN blog, and am commencing to blog here at ericwhite.com/blog. If you liked my previous blog, I expect that you will like this one. Here are my first projects:

Open XML Document Generation

I also want to write a number of samples around parameterized document generation. While it is fairly straightforward to build applications that can generate documents, I think that there is much more that can be done to make document generation much simpler and more powerful. This should be possible generate a wide variety of documents from a wide variety of data sources by changing a source template document that contains content controls. There are existing MSDN articles that show how to generate a lot of documents, but I think I’ll have my own special take on this problem.

Open XML SpreadsheetML Formulas

I’m going to complete the blog post series on writing a recursive descent parser for SpreadsheetML formulas using C# and LINQ.

SharePoint

I want to teach myself the nooks and crannies of the SharePoint server object model. In that process, I’m going to write a fair number of snippets that demonstrate how to work with particular parts of the API. I’ll be blogging those snippets. In addition, I’ve wanted to write about a number of areas of SharePoint.

I’m not sure where else my interests will take me, but one thing is certain – I’m going to continue to focus on Open XML. There is much more that can be done with functional programming and Open XML. And I think it is possible to build some amazing applications using Open XML in a SharePoint application. In blog posts on my MSDN blog, I’ve worked out the mechanics of working with Open XML documents in SharePoint, however, I haven’t really started taking advantage of file formats to ‘light up’ documents.

This is going to be fun!

Eric White, software developer

!!!

13 Comments »

  1. dh said,

    April 12, 2011 @ 9:26 pm

    Hi. you wrote an article about 2 yrs ago on using web services to access sharepoint data. I’ve been reading and applying this, but I can’t seem to get it to do what I’m trying to do. we are trying to access the version history in SharePoint list with web services.

    Can you point me to what I need to alter for this to work in you article?

    http://blogs.msdn.com/b/ericwhite/archive/2009/01/06/getting-started-with-sharepoint-wss-web-services-using-linq-to-xml.aspx

    Thanks,!!

  2. Eric White said,

    April 13, 2011 @ 6:44 am

    Hi,

    Unfortunately, I have never written any code to access history for a SharePoint list. Are you trying to access the revision history for a document in a document library?

    Is it necessary to use web services? Are you using SharePoint 2010, and can you use the SharePoint Client Object Model instead?

    This is a great idea, and something I would love to tackle. However, I’m pretty slammed with work at the moment, but I’ll definitely add it to the list of interesting topics.

    -Eric

  3. Jiri Janecek said,

    May 9, 2011 @ 3:20 am

    Thank you for MSDN Article (May 2011) on “Consuming External ODATA Feeds with SharePoint BCS”
    “SharePoint Foundation 2010 and SharePoint Server 2010 expose list data as an OData feed. This functionality is enabled by default. If you have a SharePoint site installed at the URL http://intranet.contoso.com, you can retrieve the set of SharePoint lists for the site by entering http://intranet.contoso.com/_vti_bin/listdata.svc into your browser …
    There _vti_bin implies Front Page extensions – but when I try to connect to the general site on the server – with SharePoint Designer 2007 – I get response that FP Extensions are NOT installed – and Windows 2008 R2.
    This is question outside the SharePoint – what is _vti_bin doing there?

  4. Eric White said,

    May 9, 2011 @ 3:33 am

    Hi Jiri,

    You can’t connect to SharePoint 2010 with SharePoint Designer 2007. You must use SharePoint Designer 2010. Front page extensions are installed on 2010, but I am not sure if you would ever use them from anything other than SharePoint Designer 2010. Here is the link to Front Page Extensions docs for 2010: http://msdn.microsoft.com/en-us/library/ms443099.aspx

    -Eric

  5. Yuribashi said,

    April 24, 2012 @ 2:53 pm

    Your blogs are a saving grace! Thank you so much for providing so much useful information!

    Working for months getting my solution working, I’m now at a stand still and could use some direction/information.

    Is using SharePoint 2010’s Word Automation Services the only way to consume docx files that have AltChunks, converting them to ‘normal’ docx files? The reason I’m asking is I’ve got a SharePoint workflow converting my docx files from AltChunk docx files to ‘normal’ docx files, but it will only process one file per minute. So, I’m wondering if there is different application/method of conversion, Not requiring SharePoint, or if SharePoint will process much faster, but I’ve just got the configuration off, &c. Any suggestions are greatly appreciated.

    Kind regards,
    Yuribashi

  6. Eric White said,

    April 24, 2012 @ 5:50 pm

    Hi Yuribashi,

    It all depends on what you are importing via altChunk. Html? Other OpenXML WordprocessingML documents?

    -Eric

  7. Yuribashi said,

    April 24, 2012 @ 6:23 pm

    Yes, I’m importing HTML inside the altChunk. All the workflow is doing is converting the files in a folder, from docx to docx. No other files types are in the folder. The workflow job is running on/at the folder level. Should I change things so that the workflow operates on each individual document?

    Cheers,
    Yuribashi

  8. Eric White said,

    April 25, 2012 @ 2:32 pm

    The turnaround time for word automation services is 60 to 90 seconds and there is no way to.reduce that. However if you have many docs to process then you can batch them. Word Automation services can have a thoughput of several docs per second.

    -Eric

  9. Yuribashi said,

    April 25, 2012 @ 6:13 pm

    Thank you for your kind patience and expertise. Looking further through an administrative document, I found “Number of conversions to start (per conversion process)” and set it to 90, per your suggestion. Everything is working just fine!

    You’ve given me a life! HA!

    Cheers,
    Yuribashi

  10. Rich Stewart said,

    May 29, 2012 @ 4:35 am

    Eric,

    In 2010 you wrote an article on Using the SharePoint Foundation 2010 Managed Client Object Model with the Open XML SDK 2.0. In that article you gave a code sample on how to retrieve documents from a document library. Do you have a code sample on how to save a document on a file system that was read from a document library?

    What I really want to do is to combine several documents that are in different subfolders of a document library into a single document on a file system. I know I can do this if I can just save a document using Open XML, however if you could provide code that would allow me to stream the content from several document library documents into a single Word document on a file system that would be even better.

    Thanks,
    Rich

  11. Eric White said,

    May 29, 2012 @ 1:14 pm

    Hi Rich,

    Once you have the document in a stream, there are a number of ways to write it to the file system. You can stream it directly to a file. You can call ToArray() on a memory stream, which returns a byte array, which you can then write to the file system. I don’t have a direct example of this, but if you take a look at this MSDN article, you can find out the relevant information:

    http://msdn.microsoft.com/en-us/library/ee945362.aspx

    To combine multiple Open XML WordprocessingML documents into a single document, I recommend that you use the DocumentBuilder class. Find out more here:

    http://openxmldeveloper.org/wiki/w/wiki/documentbuilder.aspx

    -Eric

  12. Jemdo said,

    October 30, 2012 @ 4:34 am

    Hi, Eric
    I like that “C# and XPath in content control” idea, and saw nice conversation with Svetin about content control types. But my task now is somewhat simplier – I need to make docx templates with SharePoint 2007 data source (list). I came to the somewhat same “content control types” idea though I’m using value types a bit different: title specifies element in splist and tag specifies field in splist. That’s easier for template designer (this way he could be just avg Office user as Svetlin said earlier)
    I think from what stated above you could understand that splist contains elements with different “structure” and that’s one of my limitations (can’t do anything with that).
    As a bonus idea – meta information (for example about conditional controls) could be stored in a separate splist.

    Well my question is – are there other nice solutions with this simplification?

  13. Michael said,

    June 4, 2016 @ 4:00 am

    Hi Eric,
    Do you know where I can download the sample files for an article you wrote back in 2009 titled: SharePoint and Open XML – Generating Documents from SharePoint with Open XML Content Controls back in 2009?
    Thanks,

RSS feed for comments on this post · TrackBack URI

Leave a Comment