Page 1 of 1

CSV files

Posted: Mon Jun 09, 2008 3:57 pm
by Charles L. Cotton
I am looking at feature to add to www.TexasShooting.com to allow people to register on-line for the TexasCHLforum Day at PSC and other events. The data will go into a MySQL database on the server, then it can be exported into a CSV file.

Does anyone know how I take the CSV file and import it into software that will allow me to create a useful report? I presume I could just import it into an Excel spreadsheet or perhaps an Access database. I thought about trying to write something to query the MySQL database directly, but I really don't want to mess with the database.

Thanks,
Chas.

Re: CSV files

Posted: Mon Jun 09, 2008 4:02 pm
by Keith B
Charles,

A .csv file is easily importable into either Access or Execl. It is just flat text file that has each entry separated by a comma.

If you need more assistance, just drop me a PM and I can call you.


Regards,

Re: CSV files

Posted: Mon Jun 09, 2008 4:21 pm
by Xander
To add to what Keith said, Excel is usually registered as the default program for opening files with a CSV extension, so it may be as simple as double-clicking on the file.

Re: CSV files

Posted: Mon Jun 09, 2008 5:00 pm
by WildBill
Excel also has a save file option to CSV.

Re: CSV files

Posted: Mon Jun 09, 2008 5:20 pm
by drw
Lots of computer guys here. :cool: If you want more advice on the server backend side of things, do post. I'm a PHP/MySQL developer and if nobody else knows the answer, I probably will.

Re: CSV files

Posted: Mon Jun 09, 2008 5:46 pm
by Charles L. Cotton
Thanks guys. I looked at Excel and found the import function. However, it didn't show a csv file as an option.

Could I create a master report in Excel for each event, then import the data from the csv file? Or do I have to import the csv file, then do the formatting like column headings, etc.?

Chas.

Re: CSV files

Posted: Mon Jun 09, 2008 6:07 pm
by Keith B
Charles L. Cotton wrote:Thanks guys. I looked at Excel and found the import function. However, it didn't show a csv file as an option.

Could I create a master report in Excel for each event, then import the data from the csv file? Or do I have to import the csv file, then do the formatting like column headings, etc.?

Chas.

Easiest is just to open the file vs. import.

Start Excel, choose File, Open, then in the box below the filename that says Files of Types, choose the Text file option and find the file on your computer. It should open right up as it knows how to delimit the file with he commas, and should be pretty well formatted. Add headings if they were not part of the .csv file to begin with. Save as a .xls file and you are there!!!

Re: CSV files

Posted: Mon Jun 09, 2008 7:39 pm
by Kalrog
Charles L. Cotton wrote:Thanks guys. I looked at Excel and found the import function. However, it didn't show a csv file as an option.

Could I create a master report in Excel for each event, then import the data from the csv file? Or do I have to import the csv file, then do the formatting like column headings, etc.?

Chas.
You can do any of the above. You can export from a database to a CSV file. You can just open it in Excel. You can load the CSV file directly into a database if you would rather as well. Although I suggest using tabs as the delimiter instead of commas.

Yeah, I do this all the time. Automate it even.

Re: CSV files

Posted: Tue Jun 10, 2008 1:13 pm
by Skiprr
Kalrog wrote:Although I suggest using tabs as the delimiter instead of commas.
:iagree: If the option is available to work with tab-delimited files, the advantage is that it becomes cleaner and easier to work with data elements that may have embedded commas. Examples are addresses that--no matter how much you try to constrain it by having data entry look like "address1","address2","city","state","zip"--still inevitably end up with something like "1234 Main St, Apt 56"; or surnames that end up like "Smith, Jr." If you're dealing with things like membership rosters or mailing lists, tab-delimited is a cleaner way to do it.

And if you pull the CSV file into Excel, you now have a dirt-simple way to use Word's mail merge functions to help automate email, mailing labels, or even name tags for the event. :smile: