Re: Import Excel sheet into SQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote:
> Hi Evert,
>
> I have attached it again.
>
>
> Regards,
>
> Nasreen
>
> ----- Original Message ----
> From: Evert Lammerts <evert.lammerts@xxxxxxxxx>
> To: Nasreen Laghari <nasreen_laghari@xxxxxxxxx>
> Sent: Friday, September 5, 2008 11:03:18 AM
> Subject: Re:  Import Excel sheet into SQL
>
> Attachment didn't make it
>
> On Fri, Sep 5, 2008 at 12:00 PM, Nasreen Laghari
> <nasreen_laghari@xxxxxxxxx> 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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux