Import Excel sheet into SQL

--0-987654229-1220608810=:99686
Content-Type: multipart/alternative; boundary="0-1412201067-1220608810=:99686"

--0-1412201067-1220608810=:99686
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,=0A=A0=0AHow can I import Excel sheet into MS-SQL. The data I have saved=
in excel sheet is in cells, snapshot is attached in this email. =0A=A0=0AI=
am using sqlmyAdmin. and tried using import but getting error "Invalid Cou=
nt on line1"=0A=A0=0A=A0=0A=A0=0AHelp required!!!=0A=A0=0A=A0=0ANasreen=0A=
=0A=0A
--0-1412201067-1220608810=:99686
Content-Type: text/html; charset=us-ascii

<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:garamond, new york, times, serif;font-size:12pt"><P>Hi,</P>
<P> </P>
<P>How can I import Excel sheet into MS-SQL. The data I have saved in excel sheet is in cells, snapshot is attached in this email. </P>
<P> </P>
<P>I am using sqlmyAdmin. and tried using import but getting error "Invalid Count on line1"</P>
<P> </P>
<P> </P>
<P> </P>
<P>Help required!!!</P>
<P> </P>
<P> </P>
<P>Nasreen</P>
<P> </P>
<P> </P>
<P> </P></div><br>

</body></html>
--0-1412201067-1220608810=:99686--

--0-987654229-1220608810=:99686
Content-Type: text/plain; charset=us-ascii

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--0-987654229-1220608810=:99686--
Nasreen Laghari [ Fr, 05 September 2008 12:00 ] [ ID #1967546 ]

Re: Import Excel sheet into SQL

Save your excel file as CSV, and run the following command:

mysqlimport --fields-optionally-enclosed-by="""
--fields-terminated-by=, --lines-terminated-by="\r\n"
--user=YOUR_USERNAME --password YOUR_DATABASE YOUR_TABLE.csv

Make sure not to include the headers of your excel columns and to set
up your table beforehand. Don't forget to replace all necessary parts
in the command above.

If you're not on Windows you should probably use \n instead of \r\n
for the newline character.

On Fri, Sep 5, 2008 at 1:12 PM, Nasreen Laghari
<nasreen_laghari [at] yahoo.com> wrote:
> Hi Evert,
>
> I have attached it again.
>
>
> Regards,
>
> Nasreen
>
> ----- Original Message ----
> From: Evert Lammerts <evert.lammerts [at] gmail.com>
> To: Nasreen Laghari <nasreen_laghari [at] yahoo.com>
> Sent: Friday, September 5, 2008 11:03:18 AM
> Subject: Re: [PHP-DB] Import Excel sheet into SQL
>
> Attachment didn't make it
>
> On Fri, Sep 5, 2008 at 12:00 PM, Nasreen Laghari
> <nasreen_laghari [at] yahoo.com> wrote:
>> Hi,
>>
>>
>>
>> How can I import Excel sheet into MS-SQL. The data I have saved in excel
>> sheet is in cells, snapshot is attached in this email.
>>
>>
>>
>> I am using sqlmyAdmin. and tried using import but getting error "Invalid
>> Count on line1"
>>
>>
>>
>>
>>
>>
>>
>> Help required!!!
>>
>>
>>
>>
>>
>> Nasreen
>>
>>
>>
>>
>>
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Evert Lammerts [ Fr, 05 September 2008 13:30 ] [ ID #1967547 ]
PHP » gmane.comp.php.database » Import Excel sheet into SQL

Vorheriges Thema: mysql auto_increment
Nächstes Thema: MySQL Reporting Tool