Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding appropriate data in Excel
Message
 
 
À
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:
01336640
Vues:
13
Hilmar

I was hoping to find a way to avoid having such rigid rules. Sometimes the budget is calculated in Excel; for example, they may know the total budget, and then allocate it on a percentage basis to each salesperson. It would be good to give them the flexibility to calculate the budget in any way they want.

Perhaps one can name a cell that contains the starting data? I wonder if that will work, and if one can detect the named cell when importing into VFP.

Thanks for the suggestion.

Cyril


>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
  • Précédent
    Suivant
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform