PDA

View Full Version : Importing from Excel


Fotoman
02-12-2008, 01:00 PM
PHPMagic sounds like just the thing I'm looking for. I have an Excel spreadsheet with around 460 busines contacts, their addresses, telephones, inside leg measurements, etc. I need to attach a PDF report to each of them (no problems there, I presume?)

:confused: What I need to know is can I import all those names from Excel? I do not relish having to type in all that data again!

Also, is it fairly easy to do as I have limited experience in web databases?

I would guess that I would have to set up the fields in PHPMagic to match my spreadsheet but that's about all the knowledge I have!

Any help will be most gratefully received.

Fotoman

SusanH
02-12-2008, 02:50 PM
Hi,

I would guess that I would have to set up the fields in PHPMagic to match my spreadsheet Exactly .. However you would want to add a field to make a Primary key. For example Field name:Rec_id, primary key, auto_increment. I do this for running queries later on.

Do you have ms access?

I need to attach a PDF report to each of them (no problems there, I presume?) What do you mean exactly here? You will upload the pdf file for these records?

Fotoman
02-13-2008, 02:05 PM
I have a report on each company in PDF format that needs to be loaded up and viewable (clickable?) as the phpMagic Demo page allows you do. (Uploads field)

Yes, I have MS Access; haven't used for ages, but I created a database and imported the Excel file. Access asked for and automatically created a Primary Key field, and it's all there in Access now.
Field headings across the top, i.e. ID, Name, Address, Town, etc.

:confused: What now?

xacto
02-13-2008, 05:22 PM
You can use the 'access to mysql (http://www.websitedatabases.com/access-mysql.html)' application to create a dump file of the access db table data.

If you have not already done so login at your web host control panel and create the mysql db you will use.

Next use phpmagic to create your table. One of these fields would be the file upload field. VarChar, Length 100 or another length you decide, Allow file upload, set file upload size limitation,(I usually enter 2000000 here since it is in bytes), select pdf file type. Very your db design and generate the code.

Now upload the phpmagic folder with files to a folder and run the setup file to create the db. (see the help file if you get stuck) After you run the setup file upload the file you create using the access to mysql (http://www.websitedatabases.com/specials.html) file to the same folder. Execute or run the generated php file in your browser. This will populate the db with your excel data.

Hopes this helps. I did this like a year ago so I'm going on what I remember.
Cheers