I have some difficulties with import xls file to sql server. The problem
is I try to import excel-html file but not ordinary excel-binary file.
I use to use query like that :
select 1,2,3,4,5 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;
DATABASE=c:\zeszyt1.xls;HDR=YES', 'Select * from [a$]')
but it works only with binary files. With html files in return a message:
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: An External table has unexpected format.]
So , how to import excel-html files ?
thanks inadvance
K.you can't because it doesnot have.xls extension.
convert back to .xls and use it
Regards
R.D
--Knowledge gets doubled when shared
"krzys[wawa]" wrote:
> I have some difficulties with import xls file to sql server. The problem
> is I try to import excel-html file but not ordinary excel-binary file.
> I use to use query like that :
>
> select 1,2,3,4,5 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;
> DATABASE=c:\zeszyt1.xls;HDR=YES', 'Select * from [a$]')
> but it works only with binary files. With html files in return a message:
> OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
> [OLE/DB provider returned message: An External table has unexpected format
.]
>
> So , how to import excel-html files ?
> thanks inadvance
> K.
>|||R.D napisa?(a):
> you can't because it doesnot have.xls extension.
> convert back to .xls and use it
>
no no, this file looks like ordinary excel file. Has an extension xls
and also xls icon.|||If my guess is correct, you have converted excel sheet to webpage. then it i
s
.htm page though a small X icon is there. Right click and check once again
the extension.
Is must have .htm extension
Regards
R.D
--
Regards
R.D
--Knowledge gets doubled when shared
"krzys[wawa]" wrote:
> R.D napisa?(a):
>
> no no, this file looks like ordinary excel file. Has an extension xls
> and also xls icon.
>|||R.D napisa?(a):
> If my guess is correct, you have converted excel sheet to webpage. then it
is
> .htm page though a small X icon is there. Right click and check once again
> the extension.
> Is must have .htm extension
> Regards
> R.D
well, in fact this file has a structure of html file (or very similiar).
This file was generated by web application and it has extension xls -
believe me I check it in text mode :)|||Now you can open it in excel and save as .xls file and you should be able to
import.
Regards
R.D
--Knowledge gets doubled when shared
"krzys[wawa]" wrote:
> R.D napisa?(a):
>
> well, in fact this file has a structure of html file (or very similiar).
> This file was generated by web application and it has extension xls -
> believe me I check it in text mode :)
>
Monday, March 26, 2012
import from Excel file
Labels:
database,
difficulties,
excel,
excel-binary,
excel-html,
file,
import,
microsoft,
mysql,
oracle,
ordinary,
problemis,
server,
sql,
xls
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment