CSV files

Most of us are not "computer people" so post your technical questions and comments here. If you have computer or Internet expertise, share it here.

Moderators: carlson1, Keith B

Post Reply
User avatar

Topic author
Charles L. Cotton
Site Admin
Posts in topic: 2
Posts: 17787
Joined: Wed Dec 22, 2004 9:31 pm
Location: Friendswood, TX
Contact:

CSV files

#1

Post 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.
User avatar

Keith B
Moderator
Posts in topic: 2
Posts: 18503
Joined: Sat Aug 18, 2007 3:29 pm

Re: CSV files

#2

Post 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,
Keith
Texas LTC Instructor, Missouri CCW Instructor, NRA Certified Pistol, Rifle, Shotgun Instructor and RSO, NRA Life Member

Psalm 82:3-4

Xander
Senior Member
Posts in topic: 1
Posts: 766
Joined: Fri Jun 01, 2007 11:27 am
Location: Plano
Contact:

Re: CSV files

#3

Post 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.
User avatar

WildBill
Senior Member
Posts in topic: 1
Posts: 17350
Joined: Tue Jul 03, 2007 12:53 pm
Location: Houston

Re: CSV files

#4

Post by WildBill »

Excel also has a save file option to CSV.
NRA Endowment Member

drw

Re: CSV files

#5

Post 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.
User avatar

Topic author
Charles L. Cotton
Site Admin
Posts in topic: 2
Posts: 17787
Joined: Wed Dec 22, 2004 9:31 pm
Location: Friendswood, TX
Contact:

Re: CSV files

#6

Post 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.
User avatar

Keith B
Moderator
Posts in topic: 2
Posts: 18503
Joined: Sat Aug 18, 2007 3:29 pm

Re: CSV files

#7

Post 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!!!
Keith
Texas LTC Instructor, Missouri CCW Instructor, NRA Certified Pistol, Rifle, Shotgun Instructor and RSO, NRA Life Member

Psalm 82:3-4

Kalrog
Senior Member
Posts in topic: 1
Posts: 1886
Joined: Mon Mar 28, 2005 10:11 am
Location: Leander, TX
Contact:

Re: CSV files

#8

Post 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.
User avatar

Skiprr
Moderator
Posts in topic: 1
Posts: 6458
Joined: Fri Oct 20, 2006 4:50 pm
Location: Outskirts of Houston

Re: CSV files

#9

Post 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:
Join the NRA or upgrade your membership today. Support the Texas Firearms Coalition and subscribe to the Podcast.
I’ve contacted my State Rep, Gary Elkins, about co-sponsoring HB560. Have you contacted your Rep?
NRA Benefactor Life Member
Post Reply

Return to “Technical Tips, Questions & Discussions (Computers & Internet)”