1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice

How to Parse Inventory from online store into a spreadsheet

Discussion in 'General Programming Chat' started by MikeHustle, Dec 7, 2010.

  1. MikeHustle

    MikeHustle Power Member

    Mar 1, 2009
    Likes Received:
    Does anyone of a fast way to parse an online store's inventory into a spreadsheet. I've tried wget but it didn't do what I need.
  2. MaDeuce

    MaDeuce Newbie

    Oct 24, 2008
    Likes Received:
    Austin, TX
    'wget' just transfers the file, AFIK, it can't be used to assist in an import. If you mean you are exporting the data, then transferring with wget, here's what I'd suggest.

    When you save the inventory from the online store, what format is it stored in? If you have the ability to choose, choose 'CSV'. If you are using Excel, you can just 'import' and tell Excel that it is CSV. You'll also have the option of choosing other delimiters and specifying data types (e.g., date). Very easy.

    If you are using an 'official' export function in a online store, it almost has to support CSV.

    If not, then you'll have to figure out what delimiter (if any) is being used and try to coerce Excel into understanding that format. Some primitive systems might not use CSV, but rather fixed-length fields (e.g, 'id' is in columns 0-9, 'description' is in 10-40, etc.). IIRC, you can also specify fixed length fields in an Excel import.

    Worst case, which is extremely unlikely, you'll need to write a 'filter' to convert the format used by the store to another format supported by your spreadsheet, most likely CSV.