Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jesper Georgsson 6 posts 26 karma points
    May 20, 2013 @ 16:12
    Jesper Georgsson
    0

    Display information from csv/xlsx to html table

    Hi guys!

    I'm currently developing a website, where I now need to create a few tables. I have recieved a xlsx-file, with about 1600 rows, divided in about 15 different product-categories. I need to display a specific product under a specific category by razor or something else.

    I have an idea, though I dont know if it's the best one. Anyway: divide the xlsx-file into the 15 different product-categories and export to .csv. These csv files I upload in my page in Umbraco, and then by some awesome code print it out in a html table through razor. 

    What have I done so far? - Well, I have created one .csv to use as test while creating everything. Added a property on the Document Type, so that I can upload i file (csv). But then Im stuck. What is my next move? Should a create a razor and call for the uploaded file on the Node? 

    Extremely thankful for any help :)

    Cheers,
    Jesper

  • Amir Khan 1284 posts 2741 karma points
    May 20, 2013 @ 23:31
    Amir Khan
    0

    Hi Jesper, are you aiming to create a node for each row in your sheet? You could use CMS import and import the whole sheet at once putting each column into a different property on each node, then print it out with Razor or XLST however you want.

    Here's a link to CMS import, there's both a paid and free version, you could probably make due with the free one for your needs if you split the sheet up, but the paid one is awesome: http://our.umbraco.org/projects/developer-tools/cmsimport

     

    -Amir

  • Jesper Georgsson 6 posts 26 karma points
    May 21, 2013 @ 15:41
    Jesper Georgsson
    0

    Thanks for your answer Amir.

    It doesn't have to be a new node for every row i the sheet. I just tried now, and the import works. But as you said, every row become a single node. The important thing is to get all nodes in a Table. So I guess I should figure out how to get all sub-nodes to a Table?

    Jesper

Please Sign in or register to post replies

Write your reply to:

Draft