View Full Version : excell and mambo
I there a way to develope a component that will populate information from a excell file.
What I have is information like...
Resort Check In City St/Country Unit Sleeps Request Info
and the Resort section has a samll thumb nail pic I also want to include, The request info section normaly will be price but I removed that and going to have them click on a button to request the price.
If there serious they will book it, instead of shop.
But I will like to beable, Go to my mambo admin page and and just upload load the excell file. I hope you understand what I was asking.
Thank you
Chris
yes, you can do it, but not the excel file itself. You may save your data in CSV (comma separated) file format (you can directly save as in excel) and then there are some routines in internet that can upload CSV and prepare a table for you (for your ease, but you can code yourself too, read the file line by line, explode by commas and put it in a sql line).
hope it helped. :cheesy:
.
MediaManager knows what a Microsoft Office file is and can upload them, but currently does not have the smarts to render them. You can double check this by taking a look at the mime types supported by /administrator/media_manager/uploadfiles.php.
For Mambo installations installed on a Windows machine, you should be able to embed the file in content by embedding the applicable COM control in content using <object> elements, but you need an editor that is reasonably close to XHTML-CSS compliance (FCK and TinyMCE 2 are the only two I believe that come anywhere near close). The HTMLarea based editors have a problem with <object> and attempt to replace it with the <embed> element which only works with Netscape 4 correctly.
You might be able to transform your excel spreadsheet into XML format using a filter and them import it into Mambo begining with version 4.6 because it includes a Sax parser.
I there a way to develope a component that will populate information from a excell file.
What I have is information like...
Resort Check In City St/Country Unit Sleeps Request Info
and the Resort section has a samll thumb nail pic I also want to include, The request info section normaly will be price but I removed that and going to have them click on a button to request the price.
If there serious they will book it, instead of shop.
But I will like to beable, Go to my mambo admin page and and just upload load the excell file. I hope you understand what I was asking.
Thank you
Chris
thank you both , will have to read up a bit how to get this started, I have the tables done for the mysql.
if you guys can and willing to up can you walk me through this to make this compenent, I'n not asking you guys to make it for me just asking if you guys can walk me through it.
you can simply start reading the files, fopen, fgetc functions and read the file line by line, then if it is comma separated , separate it by comma, by the help of Explode function, explode(",", $yourline) and then create a sql query like this:
//-----read the file here (fopen)
// start reading line by line in a loop
// here you have your $line variable in a loop
$vars = explode (",",$line);
$sql = "insert into **** (id, ....,...) values (null, $vars[1],...);
// run your query
// end reading of the loop
// close the file
hope it helped.
;)
Sorry but not following you.
you can simply start reading the files, fopen, fgetc functions and read the file line by line, then if it is comma separated , separate it by comma, by the help of Explode function, explode(",", $yourline) and then create a sql query like this:
//-----read the file here (fopen)
// start reading line by line in a loop
// here you have your $line variable in a loop
$vars = explode (",",$line);
$sql = "insert into **** (id, ....,...) values (null, $vars[1],...);
// run your query
// end reading of the loop
// close the file
hope it helped.
;)
vBulletin® v3.8.0, Copyright ©2000-2013, Jelsoft Enterprises Ltd.