Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

How to Import From the Xlsx-XML(XLSX file Saved in XML Format) Data in to SQL Server

$
0
0

Hi  All ,

My name is Srinivas.I have one question ?

 Any one please help how to read the data from Xlsx-XML Template ( Xlsx Template is saved in XML Formate) from SQL Server query . If we Open this template It is Opened in Xlsx format and it does'nt show any tags or cells.

For Ex :   Like following ex  read data from  Xlsx file using OPENROWSET

Select * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\69\Test.xlsx;HDR=YES',
                'SELECT * FROM [Sheet1$]') Spread.

<Cell ss:StyleID="s71"><Data ss:Type="String">Title</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>
    <Cell ss:StyleID="s72"><Data ss:Type="String">Type</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>
    <Cell ss:StyleID="s72"><Data ss:Type="String">Sub-Type</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>
    <Cell ss:StyleID="s71"><Data ss:Type="String">Reference</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>
    <Cell ss:StyleID="s73"><Data ss:Type="String">Country</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>
    <Cell ss:StyleID="s74"><Data ss:Type="String">TestFirm</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>
    <Cell ss:StyleID="s74"><Data ss:Type="String">Manager</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>
    <Cell><Data ss:Type="String"> Manager2</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>
    <Cell ss:StyleID="s74"><Data ss:Type="String">Party</Data><NamedCell
      ss:Name="Print_Titles"/></Cell>    
   </Row>
   <Row ss:AutoFitHeight="0" ss:Height="27.5625">
    <Cell ss:StyleID="s79"><Data ss:Type="String">Test Name</Data></Cell>
    <Cell><Data ss:Type="String">Test Type</Data></Cell>
    <Cell><Data ss:Type="String">TestSbtype</Data></Cell>
    <Cell ss:StyleID="s79"><Data ss:Type="String">Reference67854h</Data></Cell>
    <Cell ss:StyleID="s80"><Data ss:Type="String">USA</Data></Cell>
    <Cell ss:StyleID="s80"><Data ss:Type="String">jk0001</Data></Cell>
    <Cell ss:StyleID="s82"><Data ss:Type="String">test@gmail.com</Data></Cell>
    <Cell ss:StyleID="s83"><Data ss:Type="String">test@gmail.com</Data></Cell>
    <Cell ss:StyleID="s80"><Data ss:Type="String">UNKNOWN</Data></Cell>
    <Cell ss:StyleID="s84"><Data ss:Type="String">vkv0058</Data></Cell>
    <Cell ss:StyleID="s80"><Data ss:Type="String">CLOSED PER MM 8/15/2006 EM</Data></Cell>
     <Cell ss:StyleID="s86"><Data ss:Type="DateTime">2008-02-26T00:00:00.000</Data></Cell>
   </Row>

s there any solution ... for this .. ( It is not a  XML Doc.... XLSX s saved in XML 2003 format) If we Open this It Opens in like a Xlsx doc...not showing any tags or elements...

Thanks in advance...


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>