Using excelcnv to convert from 2007 downwards

Answered Using excelcnv to convert from 2007 downwards

  • Wednesday, April 22, 2009 3:45 PM
    Avatar of pkr2000
    pkr2000
    Avatar of pkr2000

    pkr2000

    Partner

    775 Points 12 1 0
    Recent Achievements
    Profile Complete New Blog Commentator Code Answerer I
    (Partner)
    775 Points
     
     
    When you install the Office Compat' Kit the user gets the ability to do two things;
    1. Convert old style Office 97/03 docs into 2007 via batch processes
    2. Open a 2007 document on a machine with only 97/03 and it automatically converts it back to the old format and opens the associated application

    To do (1) in a batch file you'd run something like; excelcnv -oce "fileOldFormat.xls" "file2007.xlsx"
    To do (2) you go via the UI and it shells to running; moc "file2007.xlsx" and produces a temp file in the old format.

    So my question is, how can you run a command line argument that converts 2007 to old format? It seems that all the parts are there but I just don't know what subtle call I need to make (I hope).

    http://pdkm.spaces.live.com/

Answers

  • Tuesday, May 26, 2009 11:49 PM
    Avatar of Harjit-MSFT
    Harjit-MSFT
    Avatar of Harjit-MSFT

    Harjit-MSFT

    2,625 Points 6 2 0
    Recent Achievements
    First Marked Answer Forums Answerer III Forums Replies III
    2,625 Points
    Moderator
     
     Answered

    Hi,

    I understand your concerns and situations but at this stage there is not much information available. However, I will try to pass your request at the appropriate levels.


    Thanks,

    Harjit.

All Replies

  • Monday, April 27, 2009 2:26 PM
    Avatar of Harjit-MSFT
    Harjit-MSFT
    Avatar of Harjit-MSFT

    Harjit-MSFT

    2,625 Points 6 2 0
    Recent Achievements
    First Marked Answer Forums Answerer III Forums Replies III
    2,625 Points
    Moderator
     
     

    Hi,

     

    Thank you for contacting Microsoft Innovate On Office Advisory Services.

     

    The following is the details of your request:

     

    Request

    You would like to know if there was a way to convert Office 2007 files to older file formats like Office 2003 or Office 97 

     

    Next Step

    I will research on the issue and update you as soon as possible. Could you please elobarate on why would you like to convert the documents from 2007 format to older formats?
     

     

    Note:

    For alerts on this post, please refer to the following link

    http://forums.microsoft.com/msdn/languages/en-US/docs/faq.aspx?SiteID=1#19

     

     

    Thanks,

     

    Harjit.

     

  • Tuesday, May 05, 2009 7:42 PM
    Avatar of pkr2000
    pkr2000
    Avatar of pkr2000

    pkr2000

    Partner

    775 Points 12 1 0
    Recent Achievements
    Profile Complete New Blog Commentator Code Answerer I
    (Partner)
    775 Points
     
     
    For several reasons many of my customers refuse to upgrade to 2007 so I we have to produce older versions of the files too.

    http://pdkm.spaces.live.com/
  • Tuesday, May 05, 2009 10:05 PM
    Avatar of Pranab-MSFT
    Pranab-MSFT
    Avatar of Pranab-MSFT

    Pranab-MSFT

    MSFT

    7,142 Points 10 2 2
    Recent Achievements
    Blogger III Blog Party Starter New Blog Rater
    MSFT
    7,142 Points
    Moderator
     
     
    Thanks for the update.  We will get back to you with a result if we can convert Office 2007 to 2003/97 version by batch processing.
  • Wednesday, May 13, 2009 2:40 PM
    Avatar of Harjit-MSFT
    Harjit-MSFT
    Avatar of Harjit-MSFT

    Harjit-MSFT

    2,625 Points 6 2 0
    Recent Achievements
    First Marked Answer Forums Answerer III Forums Replies III
    2,625 Points
    Moderator
     
     

    Hi,

    I'm unable to locate a command line utility that will convert Office 2007 files to Office 2003 file formats. You could use a VBA macro to do this but we wouldn't recommend doing this for a large set of files as functionality could be stripped without notifications. 


    Let me know if you have any other questions.


    Thanks,

    Harjit

     

  • Wednesday, May 13, 2009 10:40 PM
    Avatar of pkr2000
    pkr2000
    Avatar of pkr2000

    pkr2000

    Partner

    775 Points 12 1 0
    Recent Achievements
    Profile Complete New Blog Commentator Code Answerer I
    (Partner)
    775 Points
     
     
    What puzzles me is that the shell command that is installed with the compat' kit is able to do the conversion so the code must be there. By tracing the call in the shell it would seem that there is an API that would do the trick, the only problem is I don't know what that API is. If MS wish to keep that a secret then ok, but if it is just a case of publishing it then that would be very useful.


    http://pdkm.spaces.live.com/
  • Friday, May 15, 2009 1:48 PM
    Avatar of Harjit-MSFT
    Harjit-MSFT
    Avatar of Harjit-MSFT

    Harjit-MSFT

    2,625 Points 6 2 0
    Recent Achievements
    First Marked Answer Forums Answerer III Forums Replies III
    2,625 Points
    Moderator
     
     
    Hi,

    I am researching on the question asked by you and will update you as soon as possible.


    Thanks,

    Harjit
  • Monday, May 18, 2009 8:40 AM
    Avatar of Tixis
    Tixis
    Avatar of Tixis

    Tixis

    0 Points 1 0 0
    Recent Achievements
    First Forums Reply
    0 Points
     
     
    I'm also much interested in learning what the command line options for moc.exe are.
    I found one already: moc.exe -f <filename> will trigger a dialog to specify new name and format. Moc is then calling excelcnv.exe or wordconv.exe to do the actual conversion.

  • Monday, May 18, 2009 3:54 PM
    Avatar of Harjit-MSFT
    Harjit-MSFT
    Avatar of Harjit-MSFT

    Harjit-MSFT

    2,625 Points 6 2 0
    Recent Achievements
    First Marked Answer Forums Answerer III Forums Replies III
    2,625 Points
    Moderator
     
     
    Hi,

     

    It was not designed to go backward per the possible loss of functionality/fidelity.  Doing this through the UI will produce the necessary dialogs informing users of lost functionality.  There's no secret API.  It wasn't designed to do that for a reason.


    I will look for the question posted on 18 May and update you as soon as possible.



    Thanks,

    Harjit

  • Wednesday, May 20, 2009 8:59 PM
    Avatar of Harjit-MSFT
    Harjit-MSFT
    Avatar of Harjit-MSFT

    Harjit-MSFT

    2,625 Points 6 2 0
    Recent Achievements
    First Marked Answer Forums Answerer III Forums Replies III
    2,625 Points
    Moderator
     
     

    Hi,

    The following site is the closest thing I can find for your request.  We don't offer any information in regards to switches.

    http://technet.microsoft.com/en-us/library/cc179019.aspx


    Thanks,

    Harjit

  • Thursday, May 21, 2009 6:25 AM
    Avatar of pkr2000
    pkr2000
    Avatar of pkr2000

    pkr2000

    Partner

    775 Points 12 1 0
    Recent Achievements
    Profile Complete New Blog Commentator Code Answerer I
    (Partner)
    775 Points
     
     

    Thanks for the post, but let me ask the question in a different way.

    1. MS have some code that does the downward conversion - check
    2. MS is worried that the user won't understand there maybe loss in the conversion - check
    3. There is no obvious command line route to kick off the downward conversion - check
    4. Double-clicking on a 2007 file will cause the Shell to automatically do the downward conversion via a user presented dialog - check
    5. The Shell is a pretty "dumb" bit set of technologies that simply calls services based on the file selected - check

    So can you...
    a) So given all the above, there is an API that the shell calls that produces (4) - will you provide the calling structure (or extern style API) to automate (4)
    b) Given (a) is possible, assuming that the dialog's only job is to ask for confirmation to continue, the code to do the conversion must be easy to call once the confirmation has been given. Can you make the call to this code public? I'll take the hit about if my customers understand the ramifications of the conversions
    c) Make a debug/symbol files for the conversion process public
    d) Just make the source code public

    I understand if MS simply don't want to make this public, but please just say that. If however, you'd prefer to allow your partners to utilize the tools in the best way for their customers then provide the how-it-works information as it's very frustrating to be so close to a good solution.


    http://pdkm.spaces.live.com/
  • Tuesday, May 26, 2009 11:49 PM
    Avatar of Harjit-MSFT
    Harjit-MSFT
    Avatar of Harjit-MSFT

    Harjit-MSFT

    2,625 Points 6 2 0
    Recent Achievements
    First Marked Answer Forums Answerer III Forums Replies III
    2,625 Points
    Moderator
     
     Answered

    Hi,

    I understand your concerns and situations but at this stage there is not much information available. However, I will try to pass your request at the appropriate levels.


    Thanks,

    Harjit.

  • Monday, August 03, 2009 3:15 PM
    Avatar of StevenHB13
    StevenHB13
    Avatar of StevenHB13

    StevenHB13

    0 Points 1 0 0
    Recent Achievements
    First Forums Reply
    0 Points
     
     

    Where can I find documentation for the excelcnv utility - documentation that describes what the command line switches "-oce" do (as well as any other switches that might apply)?

  • Monday, August 03, 2009 3:16 PM
    Avatar of StevenHB13
    StevenHB13
    Avatar of StevenHB13

    StevenHB13

    0 Points 1 0 0
    Recent Achievements
    First Forums Reply
    0 Points
     
     
    Did you ever find a satisfactory way to convert downward from the command line without launching any UI dialog boxes?

    Answering my own question:

    My question was prompted by problems I was experiencing in opening an Excel 2007 spreadsheet from within VBA (in Access but running in an unattended [batch] configuration) on a machine running Excel 2003.  By configuring my Excel application object not to display alerts, I was able to get it to open the Excel 2007 document without notifying the non-existent user of the risks of conversion.  Here's a code snippet:
        Set app = CreateObject("Excel.Application")
        app.Visible = False
        app.DisplayAlerts = False ' new line added to suppress alerts.

    Although I don't need to do this, you ought to be able to use Workbook.SaveAs, specifying an appropriate FileFormat to save in .xls format.  This isn't a command-line solution but could become one with some additional code.