• This may not be the right place to post this but I thought it might work. What I’m trying to accomplish is upload a large amount of results for an event after the fact. My customer keeps the results in a spreadsheet and it would be very simple for them if I can make to so that they can upload the information and have it display beautifully. I’ve looked around and I can’t find anything that looks like it would work quite the way I’d like.

    My plan is to create a custom post type, enter some event data, add pictures of the winners and then upload all of the results.

    Here’s an example of the type of data I’m displaying.

    Any advice?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Depending on what data format the uploaded spreadsheet is in, it can be simple or crazy making. CSV and XML formats are easy for PHP to parse and you will not have any trouble decoding the data into something PHP can work with. A native spreadsheet format like .xls requires you to obtain the file specification and develop a library capable of reading it. Unless you can find one someone has already built.

    Be careful how you allow uploads, they can be a huge security risk if not done correctly. Only present the form to logged in users. Do every thing possible to determine the file is a real spreadsheet file and not something malicious. If possible, only allow uploads from white listed IP addresses. Even if your client is on dynamic IP allocation, white listing his ISP’s entire CIDR range(s) is better than nothing.

    Thread Starter TellStevens

    (@tellstevens)

    Yeah I would only make it available on the main admin panel to specific users. Do you have anywhere you could direct me to get started on a project like this? I know enough php to be dangerous.

    Moderator bcworkz

    (@bcworkz)

    Sorry, no. I can assure you this is an attainable goal for someone without a lot of experience. It will be a struggle at times, but you will learn new useful things along the way. Divide the task into small parts and work out that little part one at a time until you’re sure it works properly. While it can be difficult to find a tutorial on the entire process, there’s plenty of references for the small component parts.

    If you get stuck on a particular part, there’s always resources like these forums and stackexchange to bail you out. Good luck! (and enjoy the challenge! ?? )

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Easily upload data from a spreadsheet to custom post’ is closed to new replies.