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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.