Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing from Excel
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01130272
Message ID:
01130279
Vues:
14
No, but thanks. See my post to myself in this thread . . .

>>I have a situation where I was importing data from an Excel spreadsheet and it worked fine. I created the cursor to import to by doing a SQL Select from another table, taking some of its fields as is and adding a COST field. The spreadsheet format matched the table format. Worked like a champ. Then I said "Hey, if you add these other two fields to your spreadsheet, we can do so-and-so" to which the client agreed. So they just tacked the two columns on to the spreadsheet (a 5 column spreadsheet became a 7 column spreadsheet) and I tacked the same two columns on to the end of the table I'm using for the import. And now the import is screwed up. The first column, part number c(12), is not coming in at all - it's just blanks. The two new fields are also not being populated.
>>
>>Here's the code:
>>
>>
>>select partnum, list_price, dlr1_price, exp1_price, 00000.00 as cost,;
>>       classid, descr;
>>   from parts;
>>   where .f.;
>>   into cursor NewPrices readwrite
>>append from "2006 Parts.xls" type xl8
>>
>>
>>In the previous code (and spreadsheet), the CLASSID and DESCR fields did not exist. Now they do and the data is not imported as expected. Anybody seen anything like this?
>>
>>Russell Campbell
>
>Aren't classid and descr memo by any chance? If so you can't import them.
>If so try this:
>
>select partnum, list_price, dlr1_price, exp1_price, 00000.00 as cost,;
>       SPACE(255) AS classid, SPACE(255) AS descr;
>   from parts;
>   where .f.;
>   into cursor NewPrices readwrite
>append from "2006 Parts.xls" type xl8
>
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform