File Format and Extension Mismatch during XML Import with XSLT Stylesheet

Diskutiere und helfe bei File Format and Extension Mismatch during XML Import with XSLT Stylesheet im Bereich Microsoft Office im Windows Info bei einer Lösung; Dear All, I am importing the following XML into Microsoft Excel: <?xml version="1.0" encoding="utf-8"?> <?mso-application progid="Excel.Sheet"?>... Dieses Thema im Forum "Microsoft Office" wurde erstellt von Alf vom Ork, 21. April 2020.

  1. File Format and Extension Mismatch during XML Import with XSLT Stylesheet


    Dear All,


    I am importing the following XML into Microsoft Excel:


    <?xml version="1.0" encoding="utf-8"?>
    <?mso-application progid="Excel.Sheet"?>
    <?xml-stylesheet type="text/xsl" href="test1.xsl"?>
    <someData>
    <r><c>a</c><c>b</c><c></c><c>c</c></r>
    <r><c>A</c><c/><c>B</c><c>C</c></r>
    </someData>


    The stylesheet "test1.xsl" referenced therein transforms it into an XMLSS i.e. Excel 2003 XML workbook:


    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet type="text/xsl"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:eek:utput method="xml" version="1.0" encoding="utf-8" omit-xml-declaration="no"/>
    <xsl:template match="/">
    <xsl:processing-instruction name="mso-application">progid=&quot;Excel.Sheet&quot;</xsl:processing-instruction>
    <Workbook xmlns="urn:schemas-microsoft-com:eek:ffice:spreadsheet"
    xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
    xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel"
    xmlns:ss="urn:schemas-microsoft-com:eek:ffice:spreadsheet">
    <Worksheet ss:Name="Sheet1">
    <Table>
    <xsl:for-each select="someData/r">
    <Row>
    <xsl:for-each select="*">
    <Cell><Data ss:Type="String">
    <xsl:value-of select="." />
    </Data></Cell>
    </xsl:for-each>
    </Row>
    </xsl:for-each>
    </Table>
    </Worksheet>
    </Workbook>
    </xsl:template>
    </xsl:stylesheet>


    Resulting in the following, transformed XML verified using MS Visual Studio:


    <?xml version="1.0" encoding="utf-8"?>
    <?mso-application progid="Excel.Sheet"?>
    <Workbook xmlns="urn:schemas-microsoft-com:eek:ffice:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:eek:ffice:spreadsheet" xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel" xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice">
    <Worksheet ss:Name="Sheet1">
    <Table>
    <Row>
    <Cell>
    <Data ss:Type="String">a</Data>
    </Cell>
    <Cell>
    <Data ss:Type="String">b</Data>
    </Cell>
    <Cell>
    <Data ss:Type="String"/>
    </Cell>
    <Cell>
    <Data ss:Type="String">c</Data>
    </Cell>
    </Row>
    <Row>
    <Cell>
    <Data ss:Type="String">A</Data>
    </Cell>
    <Cell>
    <Data ss:Type="String"/>
    </Cell>
    <Cell>
    <Data ss:Type="String">B</Data>
    </Cell>
    <Cell>
    <Data ss:Type="String">C</Data>
    </Cell>
    </Row>
    </Table>
    </Worksheet>
    </Workbook>


    When I import the original XML into Excel I am prompted to choose the stylesheet to use for the import. There I choose the "test1.xsl" entry.

    Then I get the warning that "File Format and Extension of 'test1' do not match" and am prompted to choose whether to open it none the less.

    If I choose to do so then the workbook is opened in protected view.


    When, on the other hand, I do the XSLT transformation in Visual Studio and save the resulting XML as a separate file, I can open this file afterwards in Excel without receiving any warnings about file format and extension mismatches and it is displayed by Excel in the full function view.


    I have verified this unexpected behaviour of Excel, i.e. the warning and the opening in protected view, in 32bit versions 2013, 2016 and 2019. In Excel 2019 I experience the additional, annoying issue that I cannot even unprotect the resulting workbook because when trying to do so Excel issues the following error: "We could not find 'B8D8CAE2.tmp'. Has the object been moved, renamed or deleted?" the displayed file name varies from attempt to attempt but the extension ".tmp" remains.


    Do you have any suggestions as to how to improve the stylesheet or to configure Excel so that the hoax file format extension mismatch warning does not appear any more and thus the resulting workbook is opened in full function view by Excel?


    Many thanks in advance for your help and suggestion!

    Alf
     
  2. Sylvia3105 Win User

    XLS

    Hallo Filip,

    danke - ich habe den file format converter heruntergeladen. Wie kann ich damit das entsprechende File öffnen?! Eigentlich ist es eine 2016-Datei mit ursprünglich XLSX als Extension ...

    VG, Sylvia
  3. luap Win User

    Warum kann Excel (Office 2003 Standard) eine XML Datei nicht als XML-Liste öffnen, obwohl diese Funktion zur Auswahl steht? In Excel (Office 2003 Professional) ist es möglich.

    Befehl

    Workbooks.OpenXML (filename, Stylesheets,Loadoption)

    Workbooks.OpenXML (path, 1, 2)

    1 ist mein erstes Stylesheet

    2 Loadoption als XML-Liste

    wenn ich die Loadoption auf 1 setze dann öffnet er es als schreibgeschützte Arbeitsmappe

    und das Funktioniert ist aber nicht mein Ziel weil er die dann ganz anders anzeigt

    Laufzeitfehler '1004':

    Die Methode 'OpenXML' für das Objekt 'Workbooks' ist fehlgeschlagen
  4. Thomas Löwe Win User

    Office 2010 Aktivierung nicht möglich (0x80070005)

    Hallo,



    vielen Dank für deine Nachricht.

    Nach dem Ergebnis der Diagnose besteht in Microsoft Windows 7 ein Problem mit folgenden Dateien:

    File Scan Data-->File Mismatch: C:\Windows\system32\wat\watadminsvc.exe[Hr = 0x80070003]

    File Mismatch: C:\Windows\system32\wat\npwatweb.dll[Hr = 0x80070003]

    File Mismatch: C:\Windows\system32\wat\watux.exe[Hr = 0x80070003]

    File Mismatch: C:\Windows\system32\wat\watweb.dll[Hr = 0x80070003]



    Zur Behebung des Problems gehe bitte wie folgt vor:

    Klicke auf den Startbutton und gebe dort, wo "Programme/Dateien durchsuchen" steht, cmd ein. Unter "Programme" erscheint nun CMD.EXE. Klicke mit der rechten Maustaste auf CMD.EXE und waehle "Als Administrator ausfuehren" aus. In der sich dann oeffnenden
    Konsole gebe folgenden Befehl ein: sfc /scannow. Danach sollte das Problem behoben sein.

    Kann anschließend Microsoft Office 2010 aktiviert werden?
  5. Peter-Müri Win User

    Hyperlink auf docx funktioniert nicht

    Hallo Sarah

    Ja, ich habe Office 365 repariert ohne Erfolg. Ich habe den angegebenen
    Thread
    schon vorher gelesen. Allerdings habe ich mich nicht getraut, in der Registrierung etwas zu ändern, zumal mir die Angabe von Jerry zuwenig deutlich ist (Then I scrolled to the extension docx. Wo genau liegt extension docx?).

    Die anderen Einträge brachten nichts.

    Freundliche Grüsse

    Peter
  6. Nina=) Win User

    XML Stream in Worddokument

    Hallo Mario,



    es geht dabei eigentlich darum, dass ein XML Output File in ein lesbares, wieder editierbares Word-Format konvertiert werden soll. Das XML File erzeugt eine sequentielle Tabelle mit Strukturknoten und diese soll dann in eine lesbare Tabelle (plus Inhalt)
    in ein Word Dokument konvertiert werden.

    Hast du da Vorschläge?



    Vielen Dank für deine Mühe.



    Viele Grüße

    Nina
  7. User Advert


    Hi,

    willkommen im Windows Forum!
Thema:

File Format and Extension Mismatch during XML Import with XSLT Stylesheet - Microsoft Office

Die Seite wird geladen...

File Format and Extension Mismatch during XML Import with XSLT Stylesheet - Similar Threads - File Format and

Forum Datum

Unlock RMS-Protected files with .PFILE extension

Unlock RMS-Protected files with .PFILE extension: Hi there,when tinkering with my filesystem and OS, I found some of my files to be unopenable. They were files I tried to protect from other users with the Windows built-in tool I identified as...
Apps 21. November 2023

Unlock RMS-Protected files with .PFILE extension

Unlock RMS-Protected files with .PFILE extension: Hi there,when tinkering with my filesystem and OS, I found some of my files to be unopenable. They were files I tried to protect from other users with the Windows built-in tool I identified as...
Games und Spiele 21. November 2023

Files with extension .PFILE, Request 1058432780

Files with extension .PFILE, Request 1058432780: Since some months some of my files got the extension .PFILE. Such files are images .jpg or PDF files or word documents. I was able to open such files without any problems. But now, I do not know...
Apps 1. November 2023

Files with extension .PFILE, Request 1058432780

Files with extension .PFILE, Request 1058432780: Since some months some of my files got the extension .PFILE. Such files are images .jpg or PDF files or word documents. I was able to open such files without any problems. But now, I do not know...
Games und Spiele 1. November 2023

Import / Export XML File in Excel

Import / Export XML File in Excel: Hallo zusammen Ich bin auf der Suche nach einer Lösung für mein Problem mit einem XML File. Folgende Problematik, ich habe ein File aus meiner ETS KNX Software exportiert, dies danach ins Excel...
Microsoft Office 8. Januar 2021

Neuinstallatin: Office Open XML-Formate oder OpenDocument-Formate?

Neuinstallatin: Office Open XML-Formate oder OpenDocument-Formate?: Hallo, ich habe neu Office 365 installiert. Nun muss ich einen Standardtypen wählen: Office Open XML-Formate oder OpenDocument-Formate? Leider bin ich zu schnell über diese Frage hinweg...
Microsoft Office 25. Januar 2020

Balkenfarbe bei XML-Export/Import

Balkenfarbe bei XML-Export/Import: Guten Tag Ich verwende MS-Project Daten über den XML import/Export. Wie ich das sehe, wird die Farbe der Balken eines Vorganges nicht im XML definiert. Gibt es eine Möglichkeit die Balkenfarbe...
Microsoft Office 29. Mai 2017
File Format and Extension Mismatch during XML Import with XSLT Stylesheet solved
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.