×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    11

    Generate docx file

    Hi Experts,

    I need some help/ideas from your side.

    I wan't to generate docx file on Windows Phone 7 (based on some data that are avilable).

    Anyone knows any library or have any suggestion how to resolve that?

    Many Thanks,
    Jano

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    921

    Re: Generate docx file

    I dont know of any way to create a word document and add content to it grammatically in Windows Phone. Have you considered building a webservice for this purpose, and hosting it somewhere? There are third party libraries to create docx files, and other file types, that you could implement if you have access to the full .NET stack. On Windows Phone you are working with a limited subset of the .NET framework that will make it very difficult to accomplish what you are looking for, on the phone alone.

    The idea would be to:
    - Create a Web service and host it
    - Create the application on Windows Phone that would reference the Webservice
    - Send the data you need to add to the file to your websservice, that would in turn generate the file
    - Send the file to the phone, or to whatever place you want it to be sent to. For example if you want to send it by email, instead of downloading the file to the phone, you can have your webservice sending the file directly to the destination.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: Generate docx file

    Microsoft claims that the .docx file format is a published standard (except that the standard doesn't specify everything, or is sometimes restricted to Microsoft-specific proprietary formats that are not part of the standard, and have not been published or licensed otherwise, or has other flaws where Microsoft decided to keep things in their control):

    http://en.wikipedia.org/wiki/DOCX
    http://www.groklaw.net/staticpages/i...51216153153504


    If it absolutely does not need to be a .docx file, it might be (much) easier/simpler in your code to generate an RTF file, instead. The RTF spec is simpler and has less unclear/undefined areas, and Microsoft Office, Libre Office, Open Office, etc., can read RTF files: http://en.wikipedia.org/wiki/Rich_Text_Format

    Even easier, might be to generate an HTML file (with embedded CSS for presentation). With most apps where you'd read in a .docx file, you'll be able to read an HTML file just as well. If you need to include also images, it gets a bit tricker with the various ways to package "complete" HTML pages.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Generate docx file

    While this discussion, http://docx.codeplex.com/discussions/291062, is somewhat funny, you can still consider trying what you can do with DocX (http://docx.codeplex.com) on a phone.
    There is an ancient project on SourceForge too, http://sourceforge.net/projects/officeopenxml/
    And you may probably find more on the Internet.

  5. #5
    Regular Contributor
    Join Date
    Aug 2012
    Location
    Rhine Valley
    Posts
    78

    Re: Generate docx file

    You also might want to check out openxmldeveloper.org (http://openxmldeveloper.org/, http://openxmldeveloper.org/search/s...s.aspx?q=phone). This is Microsoft's portal for the new Office file formats. There are some articles about creating documents on Windows Phone, too.

Similar Threads

  1. Nokia Web Tools IDE generate *.wgz file as error file
    By senthil_25 in forum Nokia Asha Web Apps
    Replies: 3
    Last Post: 2011-07-04, 08:49
  2. Replies: 7
    Last Post: 2010-12-08, 03:13
  3. API for reading .docx files
    By coolguy1 in forum Symbian
    Replies: 1
    Last Post: 2010-10-17, 13:27
  4. Replies: 9
    Last Post: 2008-11-17, 07:57
  5. Not generate a .exe file?
    By play_zone in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 7
    Last Post: 2008-10-15, 09:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •