2009-12-13 13 views
7

के साथ एक्सएमएल को एक्सेल में कनवर्ट करें यदि मैं नीचे एक्सेल 2007 को निर्यात करने के लिए नीचे एक्सएमएल निर्यात करता हूं ... मैं एक्सेल शीट को सही तरीके से प्राप्त करने में सक्षम हूं।एकाधिक वर्कशीट

<Workbook> 
<Worksheet > 
<MyXml> 
    <New A="111" B="222" /> 
</MyXml> 
<MyXml> 
    <New A="111" B="222" /> 
</MyXml> 
</Worksheet> 
</Workbook> 

लेकिन मुझे एक से अधिक वर्कशीट के साथ एक कार्यपुस्तिका की आवश्यकता है ... मैं इस मामले में एक्सएमएल कैसे निर्दिष्ट करूं?

उत्तर

15

इस प्रयास करें:

<?xml version="1.0"?> 
<?mso-application progid="Excel.Sheet"?> 
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:x="urn:schemas-microsoft-com:office:excel" 
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
xmlns:html="http://www.w3.org/TR/REC-html40"> 
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> 
    <ActiveSheet>2</ActiveSheet> 
</ExcelWorkbook> 
<Styles> 
    <Style ss:ID="Default" ss:Name="Normal"> 
    <Alignment ss:Vertical="Bottom"/> 
    <Borders/> 
    <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/> 
    <Interior/> 
    <NumberFormat/> 
    <Protection/> 
    </Style> 
</Styles> 
<Worksheet ss:Name="Sheet1"> 
    <Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="1" x:FullColumns="1" 
    x:FullRows="1" ss:DefaultRowHeight="15"> 
    <Row> 
    <Cell><Data ss:Type="Number">11</Data></Cell> 
    <Cell><Data ss:Type="Number">22</Data></Cell> 
    </Row> 
    </Table> 
</Worksheet> 
<Worksheet ss:Name="Sheet2"> 
    <Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="1" x:FullColumns="1" 
    x:FullRows="1" ss:DefaultRowHeight="15"> 
    <Row> 
    <Cell><Data ss:Type="Number">11</Data></Cell> 
    <Cell><Data ss:Type="Number">22</Data></Cell> 
    </Row> 
    </Table> 
</Worksheet> 
</Workbook> 

अधिक मदद के लिए आप this पर एक नज़र ले जा सकते हैं।

अंत में, आप मैन्युअल रूप से एक्सेल कार्यपुस्तिका बना सकते हैं और इसे एक्सएमएल में निर्यात कर सकते हैं ताकि आप एक्सएमएल के प्रारूप की जांच कर सकें।

+0

Thanksssssssssssssssssssssssssssssssssssss Alottttttttttttttttttttttttttttttttttttttttttttttt ... यह जवाब जो मैं के लिए इंतज़ार कर रहा हूँ था ..... धन्यवाद बहुत .... भगवान ने तुम्हें –

+0

@Dana आशीर्वाद: बढ़िया है, लेकिन मैं इसे ले आप '' जोड़ने की जरूरत इसे बनाने के लिए अपने नमूने के अंत में। अन्यथा एक्सएमएल वैध नहीं है। यह दृष्टिकोण एक्सेल 2010 और लिबर ऑफिस कैल्क दोनों के साथ काम करता प्रतीत होता है। – Gruber

+0

@ ग्रबर: तय! – Dana

संबंधित मुद्दे