Click here to Skip to main content
15,886,035 members
Articles / Programming Languages / C# 4.0

Microsoft Interop API to convert the .doc, .docx, .dot, .dotx and .xls,.xlsx, .rtf to HTML

Rate me:
Please Sign up or sign in to vote.
5.00/5 (11 votes)
13 Dec 2012CPOL3 min read 87.8K   6.4K   34  
Convert Word documents, Excel sheets to HTML files using Microsoft Office Interop API and render the result back to a client browser.
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.lang['fr-ca']={dir:'ltr',editorTitle:'Rich text editor, %1',editorHelp:'Press ALT 0 for help',toolbars:'Editor toolbars',editor:'Rich Text Editor',source:'Source',newPage:'Nouvelle page',save:'Sauvegarder',preview:'Previsualiser',cut:'Couper',copy:'Copier',paste:'Coller',print:'Imprimer',underline:'Souligné',bold:'Gras',italic:'Italique',selectAll:'Tout sélectionner',removeFormat:'Supprimer le formatage',strike:'Barrer',subscript:'Indice',superscript:'Exposant',horizontalrule:'Insérer un séparateur',pagebreak:'Insérer un saut de page',pagebreakAlt:'Page Break',unlink:'Supprimer le lien',undo:'Annuler',redo:'Refaire',common:{browseServer:'Parcourir le serveur',url:'URL',protocol:'Protocole',upload:'Télécharger',uploadSubmit:'Envoyer sur le serveur',image:'Image',flash:'Animation Flash',form:'Formulaire',checkbox:'Case à cocher',radio:'Bouton radio',textField:'Champ texte',textarea:'Zone de texte',hiddenField:'Champ caché',button:'Bouton',select:'Champ de sélection',imageButton:'Bouton image',notSet:'<Par défaut>',id:'Id',name:'Nom',langDir:"Sens d'écriture",langDirLtr:'De gauche à droite (LTR)',langDirRtl:'De droite à gauche (RTL)',langCode:'Code langue',longDescr:'URL de description longue',cssClass:'Classes de feuilles de style',advisoryTitle:'Titre',cssStyle:'Style',ok:'OK',cancel:'Annuler',close:'Close',preview:'Preview',generalTab:'Général',advancedTab:'Avancée',validateNumberFailed:'This value is not a number.',confirmNewPage:'Any unsaved changes to this content will be lost. Are you sure you want to load new page?',confirmCancel:'Some of the options have been changed. Are you sure to close the dialog?',options:'Options',target:'Target',targetNew:'New Window (_blank)',targetTop:'Topmost Window (_top)',targetSelf:'Same Window (_self)',targetParent:'Parent Window (_parent)',langDirLTR:'Left to Right (LTR)',langDirRTL:'Right to Left (RTL)',styles:'Style',cssClasses:'Stylesheet Classes',width:'Largeur',height:'Hauteur',align:'Alignement',alignLeft:'Gauche',alignRight:'Droite',alignCenter:'Centré',alignTop:'Haut',alignMiddle:'Milieu',alignBottom:'Bas',invalidHeight:'Height must be a number.',invalidWidth:'Width must be a number.',invalidCssLength:'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',invalidHtmlLength:'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).',invalidInlineStyle:'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.',cssLengthTooltip:'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).',unavailable:'%1<span class="cke_accessibility">, unavailable</span>'},contextmenu:{options:'Context Menu Options'},specialChar:{toolbar:'Insérer un caractère spécial',title:'Insérer un caractère spécial',options:'Special Character Options'},link:{toolbar:'Insérer/modifier le lien',other:'<other>',menu:'Modifier le lien',title:'Propriétés du lien',info:'Informations sur le lien',target:'Destination',upload:'Télécharger',advanced:'Avancée',type:'Type de lien',toUrl:'URL',toAnchor:'Ancre dans cette page',toEmail:'E-Mail',targetFrame:'<Cadre>',targetPopup:'<fenêtre popup>',targetFrameName:'Nom du cadre de destination',targetPopupName:'Nom de la fenêtre popup',popupFeatures:'Caractéristiques de la fenêtre popup',popupResizable:'Resizable',popupStatusBar:"Barre d'état",popupLocationBar:"Barre d'adresses",popupToolbar:"Barre d'outils",popupMenuBar:'Barre de menu',popupFullScreen:'Plein écran (IE)',popupScrollBars:'Barres de défilement',popupDependent:'Dépendante (Netscape)',popupLeft:'Position à partir de la gauche',popupTop:'Position à partir du haut',id:'Id',langDir:"Sens d'écriture",langDirLTR:'De gauche à droite (LTR)',langDirRTL:'De droite à gauche (RTL)',acccessKey:'Équivalent clavier',name:'Nom',langCode:"Sens d'écriture",tabIndex:'Ordre de tabulation',advisoryTitle:'Titre',advisoryContentType:'Type de contenu',cssClasses:'Classes de feuilles de style',charset:'Encodage de caractère',styles:'Style',rel:'Relationship',selectAnchor:'Sélectionner une ancre',anchorName:'Par nom',anchorId:'Par id',emailAddress:'Adresse E-Mail',emailSubject:'Sujet du message',emailBody:'Corps du message',noAnchors:"(Pas d'ancre disponible dans le document)",noUrl:"Veuillez saisir l'URL",noEmail:"Veuillez saisir l'adresse e-mail"},anchor:{toolbar:"Insérer/modifier l'ancre",menu:"Propriétés de l'ancre",title:"Propriétés de l'ancre",name:"Nom de l'ancre",errorName:"Veuillez saisir le nom de l'ancre",remove:'Remove Anchor'},list:{numberedTitle:'Numbered List Properties',bulletedTitle:'Bulleted List Properties',type:'Type',start:'Start',validateStartNumber:'List start number must be a whole number.',circle:'Circle',disc:'Disc',square:'Square',none:'None',notset:'<not set>',armenian:'Armenian numbering',georgian:'Georgian numbering (an, ban, gan, etc.)',lowerRoman:'Lower Roman (i, ii, iii, iv, v, etc.)',upperRoman:'Upper Roman (I, II, III, IV, V, etc.)',lowerAlpha:'Lower Alpha (a, b, c, d, e, etc.)',upperAlpha:'Upper Alpha (A, B, C, D, E, etc.)',lowerGreek:'Lower Greek (alpha, beta, gamma, etc.)',decimal:'Decimal (1, 2, 3, etc.)',decimalLeadingZero:'Decimal leading zero (01, 02, 03, etc.)'},findAndReplace:{title:'Chercher et Remplacer',find:'Chercher',replace:'Remplacer',findWhat:'Rechercher:',replaceWith:'Remplacer par:',notFoundMsg:'Le texte indiqué est introuvable.',findOptions:'Find Options',matchCase:'Respecter la casse',matchWord:'Mot entier',matchCyclic:'Match cyclic',replaceAll:'Tout remplacer',replaceSuccessMsg:'%1 occurrence(s) replaced.'},table:{toolbar:'Tableau',title:'Propriétés du tableau',menu:'Propriétés du tableau',deleteTable:'Supprimer le tableau',rows:'Lignes',columns:'Colonnes',border:'Taille de la bordure',widthPx:'pixels',widthPc:'pourcentage',widthUnit:'width unit',cellSpace:'Espacement',cellPad:'Contour',caption:'Titre',summary:'Résumé',headers:'Headers',headersNone:'None',headersColumn:'First column',headersRow:'First Row',headersBoth:'Both',invalidRows:'Number of rows must be a number greater than 0.',invalidCols:'Number of columns must be a number greater than 0.',invalidBorder:'Border size must be a number.',invalidWidth:'Table width must be a number.',invalidHeight:'Table height must be a number.',invalidCellSpacing:'Cell spacing must be a positive number.',invalidCellPadding:'Cell padding must be a positive number.',cell:{menu:'Cellule',insertBefore:'Insérer une cellule avant',insertAfter:'Insérer une cellule après',deleteCell:'Supprimer des cellules',merge:'Fusionner les cellules',mergeRight:'Fusionner à droite',mergeDown:'Fusionner en bas',splitHorizontal:'Scinder la cellule horizontalement',splitVertical:'Scinder la cellule verticalement',title:'Cell Properties',cellType:'Cell Type',rowSpan:'Rows Span',colSpan:'Columns Span',wordWrap:'Word Wrap',hAlign:'Horizontal Alignment',vAlign:'Vertical Alignment',alignBaseline:'Baseline',bgColor:'Background Color',borderColor:'Border Color',data:'Data',header:'Header',yes:'Yes',no:'No',invalidWidth:'Cell width must be a number.',invalidHeight:'Cell height must be a number.',invalidRowSpan:'Rows span must be a whole number.',invalidColSpan:'Columns span must be a whole number.',chooseColor:'Choose'},row:{menu:'Ligne',insertBefore:'Insérer une ligne avant',insertAfter:'Insérer une ligne après',deleteRow:'Supprimer des lignes'},column:{menu:'Colonne',insertBefore:'Insérer une colonne avant',insertAfter:'Insérer une colonne après',deleteColumn:'Supprimer des colonnes'}},button:{title:'Propriétés du bouton',text:'Texte (Valeur)',type:'Type',typeBtn:'Bouton',typeSbm:'Soumettre',typeRst:'Réinitialiser'},checkboxAndRadio:{checkboxTitle:'Propriétés de la case à cocher',radioTitle:'Propriétés du bouton radio',value:'Valeur',selected:'Sélectionné'},form:{title:'Propriétés du formulaire',menu:'Propriétés du formulaire',action:'Action',method:'Méthode',encoding:'Encoding'},select:{title:'Propriétés de la liste/du menu',selectInfo:'Info',opAvail:'Options disponibles',value:'Valeur',size:'Taille',lines:'lignes',chkMulti:'Sélection multiple',opText:'Texte',opValue:'Valeur',btnAdd:'Ajouter',btnModify:'Modifier',btnUp:'Monter',btnDown:'Descendre',btnSetValue:'Valeur sélectionnée',btnDelete:'Supprimer'},textarea:{title:'Propriétés de la zone de texte',cols:'Colonnes',rows:'Lignes'},textfield:{title:'Propriétés du champ texte',name:'Nom',value:'Valeur',charWidth:'Largeur en caractères',maxChars:'Nombre maximum de caractères',type:'Type',typeText:'Texte',typePass:'Mot de passe'},hidden:{title:'Propriétés du champ caché',name:'Nom',value:'Valeur'},image:{title:"Propriétés de l'image",titleButton:'Propriétés du bouton image',menu:"Propriétés de l'image",infoTab:"Informations sur l'image",btnUpload:'Envoyer sur le serveur',upload:'Télécharger',alt:'Texte de remplacement',lockRatio:'Garder les proportions',resetSize:'Taille originale',border:'Bordure',hSpace:'Espacement horizontal',vSpace:'Espacement vertical',alertUrl:"Veuillez saisir l'URL de l'image",linkTab:'Lien',button2Img:'Do you want to transform the selected image button on a simple image?',img2Button:'Do you want to transform the selected image on a image button?',urlMissing:'Image source URL is missing.',validateBorder:'Border must be a whole number.',validateHSpace:'HSpace must be a whole number.',validateVSpace:'VSpace must be a whole number.'},flash:{properties:"Propriétés de l'animation Flash",propertiesTab:'Properties',title:"Propriétés de l'animation Flash",chkPlay:'Lecture automatique',chkLoop:'Boucle',chkMenu:'Activer le menu Flash',chkFull:'Allow Fullscreen',scale:'Affichage',scaleAll:'Par défaut (tout montrer)',scaleNoBorder:'Sans bordure',scaleFit:'Ajuster aux dimensions',access:'Script Access',accessAlways:'Always',accessSameDomain:'Same domain',accessNever:'Never',alignAbsBottom:'Abs Bas',alignAbsMiddle:'Abs Milieu',alignBaseline:'Bas du texte',alignTextTop:'Haut du texte',quality:'Quality',qualityBest:'Best',qualityHigh:'High',qualityAutoHigh:'Auto High',qualityMedium:'Medium',qualityAutoLow:'Auto Low',qualityLow:'Low',windowModeWindow:'Window',windowModeOpaque:'Opaque',windowModeTransparent:'Transparent',windowMode:'Window mode',flashvars:'Variables for Flash',bgcolor:'Couleur de fond',hSpace:'Espacement horizontal',vSpace:'Espacement vertical',validateSrc:"Veuillez saisir l'URL",validateHSpace:'HSpace must be a number.',validateVSpace:'VSpace must be a number.'},spellCheck:{toolbar:'Orthographe',title:'Spell Check',notAvailable:'Sorry, but service is unavailable now.',errorLoading:'Error loading application service host: %s.',notInDic:'Pas dans le dictionnaire',changeTo:'Changer en',btnIgnore:'Ignorer',btnIgnoreAll:'Ignorer tout',btnReplace:'Remplacer',btnReplaceAll:'Remplacer tout',btnUndo:'Annuler',noSuggestions:'- Pas de suggestion -',progress:"Vérification d'orthographe en cours...",noMispell:"Vérification d'orthographe terminée: pas d'erreur trouvée",noChanges:"Vérification d'orthographe terminée: Pas de modifications",oneChange:"Vérification d'orthographe terminée: Un mot modifié",manyChanges:"Vérification d'orthographe terminée: %1 mots modifiés",ieSpellDownload:"Le Correcteur d'orthographe n'est pas installé. Souhaitez-vous le télécharger maintenant?"},smiley:{toolbar:'Emoticon',title:'Insérer un Emoticon',options:'Smiley Options'},elementsPath:{eleLabel:'Elements path',eleTitle:'%1 element'},numberedlist:'Liste numérotée',bulletedlist:'Liste à puces',indent:'Augmenter le retrait',outdent:'Diminuer le retrait',justify:{left:'Aligner à gauche',center:'Centrer',right:'Aligner à Droite',block:'Texte justifié'},blockquote:'Citation',clipboard:{title:'Coller',cutError:"Les paramètres de sécurité de votre navigateur empêchent l'éditeur de couper automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl/Cmd+X).",copyError:"Les paramètres de sécurité de votre navigateur empêchent l'éditeur de copier automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl/Cmd+C).",pasteMsg:'Veuillez coller dans la zone ci-dessous en utilisant le clavier (<STRONG>Ctrl/Cmd+V</STRONG>) et appuyer sur <STRONG>OK</STRONG>.',securityMsg:"A cause des paramètres de sécurité de votre navigateur, l'éditeur ne peut accéder au presse-papier directement. Vous devez coller à nouveau le contenu dans cette fenêtre.",pasteArea:'Paste Area'},pastefromword:{confirmCleanup:'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?',toolbar:'Coller en tant que Word (formaté)',title:'Coller en tant que Word (formaté)',error:'It was not possible to clean up the pasted data due to an internal error'},pasteText:{button:'Coller comme texte',title:'Coller comme texte'},templates:{button:'Modèles',title:'Modèles de contenu',options:'Template Options',insertOption:'Remplacer tout le contenu actuel',selectPromptMsg:"Sélectionner le modèle à ouvrir dans l'éditeur<br>(le contenu actuel sera remplacé):",emptyListMsg:'(Aucun modèle disponible)'},showBlocks:'Afficher les blocs',stylesCombo:{label:'Style',panelTitle:'Formatting Styles',panelTitle1:'Block Styles',panelTitle2:'Inline Styles',panelTitle3:'Object Styles'},format:{label:'Format',panelTitle:'Format',tag_p:'Normal',tag_pre:'Formaté',tag_address:'Adresse',tag_h1:'En-tête 1',tag_h2:'En-tête 2',tag_h3:'En-tête 3',tag_h4:'En-tête 4',tag_h5:'En-tête 5',tag_h6:'En-tête 6',tag_div:'Normal (DIV)'},div:{title:'Create Div Container',toolbar:'Create Div Container',cssClassInputLabel:'Stylesheet Classes',styleSelectLabel:'Style',IdInputLabel:'Id',languageCodeInputLabel:' Language Code',inlineStyleInputLabel:'Inline Style',advisoryTitleInputLabel:'Advisory Title',langDirLabel:'Language Direction',langDirLTRLabel:'Left to Right (LTR)',langDirRTLLabel:'Right to Left (RTL)',edit:'Edit Div',remove:'Remove Div'},iframe:{title:'IFrame Properties',toolbar:'IFrame',noUrl:'Please type the iframe URL',scrolling:'Enable scrollbars',border:'Show frame border'},font:{label:'Police',voiceLabel:'Font',panelTitle:'Police'},fontSize:{label:'Taille',voiceLabel:'Font Size',panelTitle:'Taille'},colorButton:{textColorTitle:'Couleur de caractère',bgColorTitle:'Couleur de fond',panelTitle:'Colors',auto:'Automatique',more:'Plus de couleurs...'},colors:{'000':'Black',800000:'Maroon','8B4513':'Saddle Brown','2F4F4F':'Dark Slate Gray','008080':'Teal','000080':'Navy','4B0082':'Indigo',696969:'Dark Gray',B22222:'Fire Brick',A52A2A:'Brown',DAA520:'Golden Rod','006400':'Dark Green','40E0D0':'Turquoise','0000CD':'Medium Blue',800080:'Purple',808080:'Gray',F00:'Red',FF8C00:'Dark Orange',FFD700:'Gold','008000':'Green','0FF':'Cyan','00F':'Blue',EE82EE:'Violet',A9A9A9:'Dim Gray',FFA07A:'Light Salmon',FFA500:'Orange',FFFF00:'Yellow','00FF00':'Lime',AFEEEE:'Pale Turquoise',ADD8E6:'Light Blue',DDA0DD:'Plum',D3D3D3:'Light Grey',FFF0F5:'Lavender Blush',FAEBD7:'Antique White',FFFFE0:'Light Yellow',F0FFF0:'Honeydew',F0FFFF:'Azure',F0F8FF:'Alice Blue',E6E6FA:'Lavender',FFF:'White'},scayt:{title:'Spell Check As You Type',opera_title:'Not supported by Opera',enable:'Enable SCAYT',disable:'Disable SCAYT',about:'About SCAYT',toggle:'Toggle SCAYT',options:'Options',langs:'Languages',moreSuggestions:'More suggestions',ignore:'Ignore',ignoreAll:'Ignore All',addWord:'Add Word',emptyDic:'Dictionary name should not be empty.',optionsTab:'Options',allCaps:'Ignore All-Caps Words',ignoreDomainNames:'Ignore Domain Names',mixedCase:'Ignore Words with Mixed Case',mixedWithDigits:'Ignore Words with Numbers',languagesTab:'Languages',dictionariesTab:'Dictionaries',dic_field_name:'Dictionary name',dic_create:'Create',dic_restore:'Restore',dic_delete:'Delete',dic_rename:'Rename',dic_info:'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.',aboutTab:'About'},about:{title:'About CKEditor',dlgTitle:'About CKEditor',help:'Check $1 for help.',userGuide:"CKEditor User's Guide",moreInfo:'For licensing information please visit our web site:',copy:'Copyright &copy; $1. All rights reserved.'},maximize:'Maximize',minimize:'Minimize',fakeobjects:{anchor:'Anchor',flash:'Flash Animation',iframe:'IFrame',hiddenfield:'Hidden Field',unknown:'Unknown Object'},resize:'Drag to resize',colordialog:{title:'Select color',options:'Color Options',highlight:'Highlight',selected:'Selected Color',clear:'Clear'},toolbarCollapse:'Collapse Toolbar',toolbarExpand:'Expand Toolbar',toolbarGroups:{document:'Document',clipboard:'Clipboard/Undo',editing:'Editing',forms:'Forms',basicstyles:'Basic Styles',paragraph:'Paragraph',links:'Links',insert:'Insert',styles:'Styles',colors:'Colors',tools:'Tools'},bidi:{ltr:'Text direction from left to right',rtl:'Text direction from right to left'},docprops:{label:'Propriétés du document',title:'Propriétés du document',design:'Design',meta:'Méta-Données',chooseColor:'Choose',other:'<other>',docTitle:'Titre de la page',charset:'Encodage de caractère',charsetOther:'Autre encodage de caractère',charsetASCII:'ASCII',charsetCE:'Europe Centrale',charsetCT:'Chinois Traditionnel (Big5)',charsetCR:'Cyrillique',charsetGR:'Grecque',charsetJP:'Japonais',charsetKR:'Coréen',charsetTR:'Turcque',charsetUN:'Unicode (UTF-8)',charsetWE:'Occidental',docType:'Type de document',docTypeOther:'Autre type de document',xhtmlDec:'Inclure les déclarations XHTML',bgColor:'Couleur de fond',bgImage:'Image de fond',bgFixed:'Image fixe sans défilement',txtColor:'Couleur de caractère',margin:'Marges',marginTop:'Haut',marginLeft:'Gauche',marginRight:'Droite',marginBottom:'Bas',metaKeywords:'Mots-clés (séparés par des virgules)',metaDescription:'Description',metaAuthor:'Auteur',metaCopyright:'Copyright',previewHtml:'<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>'}};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Nagarro Softwares
India India
I am vijay tanwar and i am a software engineer with passion of programming. I love to programming in c#, I love to warp up more and more things in few lines of code. my favirote languages are c# and javascript and both are fully object oriended. I always like to become the .net Architect.

Comments and Discussions