Welcome Guest, Not a member yet? Register   Sign In
import excel to mysql
#21

[eluser]Monisha[/eluser]
again thanks for reply... this is not a case what ur getting.
let me explain my query.. I dont want to use import function which is already provided in MSSQL or MYSQL. I want to import an excel file like using file upload button and by coding in codeigniter i need to import this excel data in database. Right now im trying with CSV and Excel.

anybody has done it before in codeigniter?
#22

[eluser]jedd[/eluser]
[quote author="Monisha" date="1248889363"]again thanks for reply... this is not a case what ur getting.
let me explain my query.. I dont want to use import function which is already provided in MSSQL or MYSQL. I want to import an excel file like using file upload button and by coding in codeigniter i need to import this excel data in database. Right now im trying with CSV and Excel. [/quote]

There are two parts to this process.

The first is getting the file from the client (web browser) to the server. The second is parsing that file, using PHP, and feeding it into your preferred database (Microsoft SQL or MySQL by the sounds of it).

I don't know why you 'don't want to use import function which is already provided' - as using an already provided function to do the hard bit is very attractive (it's already provided, being the primary attraction).

The first bit - uploading a file - is painfully easy, and is well covered in the [url="http://ellislab.com/codeigniter/user-guide/libraries/file_uploading.html"]CI User Guide[/url] and even more excruciatingly explained in any number of forum threads.

I suspect that many of us are confused by your apparent confusion with this fairly straightforward process.
#23

[eluser]Monisha[/eluser]
Thanks jedd for quick reply.
I dont want to use the import facility directly provided in db, bocz the tool we are making is for non technical people and they dont want to interact with db. So unfortunately I have to built this functionality.

As per ur idea.. first process is to upload a file on server that I have done. Now my excel file is on my server location. and i want to read this excel sheet and import all those multiple excel sheets data into database. this becomes my second point. Now I have used ‘Excel Reader Class’ to read excel files and get operate functions on it. but getting error of

Message: Undefined property: excelreader::$Excel_reader

I hope u get my point .. and guide me...!!

thanks in advance.
#24

[eluser]jedd[/eluser]
[quote author="Monisha" date="1248890964"] ...but getting error of

Message: Undefined property: excelreader::$Excel_reader

I hope u get my point .. and guide me...!!

thanks in advance.[/quote]

Monisha, you seem to be generating a bunch of threads on the same topic - I'd suggest this doesn't help you at all (it makes it hard for other people to try to help you with one problem when the details are spread all over the place).

I notice that your code does not follow the requirement of upper-case first letter of your controller's name. This is not the problem, however, but does suggest attention to detail is perhaps not your forte.

What did your excelreader library manual / forums / etc suggest this error implies?

The two lines that you call your external library - excel_reader - appear to be this:
Code:
$this->excel_reader->read('./uploads/testfile.xls');
$worksheet = $this->Excel_reader->worksheets[0];

Allow me to disabuse you of the notion that excel_reader == Excel_reader




Theme © iAndrew 2016 - Forum software by © MyBB