Jump to content

[SOLVED] Exporting DB results (or flat file) to an Excel file


tmallen

Recommended Posts

I have two scripts, neither of which have been written, that will need to collect user information. They will either write to a flat file or to a MySQL DB, and I need a way for an administrator to grab an Excel file based on this data.

 

First, no more than 100 people are expected to sign up, so flat file is certainly viable. Do you recommend I use DB or flat file?

 

Second, based on your recommendation, how should I go about exporting the user data to an Excel file? There will be about ten form fields per registration to give you an idea.

Excel files can import text flat-files that are tab separated, comma separated, or separated by a common delimiter.

 

IE:

 

comma separated:

id,user,password,registered,money,etc,etc2,etc3

 

tab separated:

id	user	password	registered	money	etc	etc2	etc3

 

other delimiters include : | . || .. |.| (any combination really)

id||user||password||registered||money||etc||etc2||etc3
id|.:.|user|.:.|password|.:.|registered|.:.|money|.:.|etc|.:.|etc2|.:.|etc3
//and so on

 

As you can see, as long as you can write to a file with a delimiter, you're fine.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.