Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding appropriate data in Excel
Message
De
05/08/2008 11:26:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01336490
Message ID:
01336575
Vues:
14
Establish a set of rules, where the data should be located on the spreadsheet. Have the client sign it.

The rules can be of different types - certain data must be in certain columns, or immediately below a certain key text that you can search for. But for automated Excel importing, some rules certainly have to exist. If the organiztion of the data changes, you will have to redesign the import module. If it is an external client, this will require an additional charge. If it is for within your company, it will waste your time. This has to be made clear to the client / to the boss.

In the present case, the rules might look like this:
  • It is possible to have several budgets, in separate worksheets in the same workbook (file). Each budget has to be in a separate worksheet.
  • The name must be in cell B3 [note: reserving some space for headers]
  • The product must be in cell B4.
  • The budget starts on line 10.
  • The month is in column A.
  • The quantity is in column B.
  • The price is in column C.
  • An empty row indicates that there is no more data. That is, you must not leave empty rows between lines of data; lines after an empty row will not be imported.
  • ...

    Before setting up this kind of rules, I ended up changing the program every time an import was done.

    After, it became much simpler. The user must simply adhere to these rules.

    >I know how to import data from Excel.
    >However, I request advice on how to link a form to Excel.
    >
    >Here is the "look" of the form:
    >
    >
    >Name: Bill
    >Product: Milk
    >
    >Budget:
    >Month   Quantity          Price
    >----------------------------------------------
    >Jan      100          2.11
    >Feb      122          2.11
    >Mar      330          2.55
    >etc.
    >
    >
    >On the form, the user selects a name (Bill) from a list, then the product (Milk), then they enter the appropriate budget (Jan to Dec) into a grid.
    >
    >Now assume they enter their budget in an Excel spreadsheet.
    >
    >I propose to have a field on the form which contains the name of their spreadsheet.
    >What I don't know is how to get the user to setup their spreadsheet so I can find the information. How do I identify where the budget is for each person, for a particular product?
    >
    >Any advice?
    >
    >Cyril
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Précédent
    Suivant
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform