Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting to Excel WITHOUT the first row being field nam
Message
De
11/09/2000 15:37:32
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00413684
Message ID:
00415073
Vues:
25
Michael,

Got the email. I'll have a look later. Thanks for taking the time.



>I've sent it to you. The main reason I used OLE was because the Spreadsheets never started on the first line. I tried several different ways to parse out what I needed. I found that if I started with the first row of data and then manipulating the file I saved was the easiest and fastest thing to do. Used ALTER TABLE and stuff like that. Hope it helps or at least gives you some ideas.
>
>>Michael,
>>
>>I've done enough APPEND FROM's within Fox, and some simple OLE.
>>
>>What I'm after is a way to pick data out of the middle of the spreadsheet where there will otherwise be text in numeric columns, etc. And the number of lines I will need to get will be variable.
>>
>>The spreadsheet will have a bunch of data about an employee like name.
>>There will be a couple of rows which contain "column headers" for the data itself.
>>Then there will be a variable number of rows of funding sources for each employee. For example, I am paid partly by the Hospital, and partly by Pediatrics.
>>Then there will be some rows with totals which the accountants look at to make sure it all adds up.
>>
>>I'm just after the funding sources rows. Looks like the easiest way is to create a cursor and append from the sheet. I can scan my cursor and there will be empties where text was appended into a numeric field. I'll just look for the rows I want.
>>
>>Love to see your code. Mailto: cindyw@duke.edu
>>
>>Thanks!
>>
>>
>>>Cindy,
>>>
>>>I have a couple of processes that copy a spreadsheet to a dbf on a nightly basis. Would you like a copy of my code? One of the spread sheets has a password and OLE and excel and VFP and passwords don't seem to get along, so I have to jump through a couple of hopes. Having said that, both of the prg's are very short.
>>>
>>>
>>>>>>Fred,
>>>>>>
>>>>>>What works best for the reverse - selecting a bunch of cells in Excel and copying the rows into a table or an array?
>>>>>>
>>>>>>Do you just make a string and look for the tabs to parse into data?
>>>>>>
>>>>>>>
>>>>>>>Check out _VFP.DataToClip() and Paste in Excel and tell me if you still think it's slow.
>>>>>
>>>>>Cindy,
>>>>>
>>>>>I've never had a need to go the other way, but that sounds like it will work. Doesn't Excel have the ability to send data directly to .DBF's? I don't do a whole lot with Excel, I've really just played with it.
>>>>
>>>>I was thinking to copy some selected cells, but If I copy to CSV and append the whole thing to a cursor, and then pick out what I want (using VAL(), etc. to change from char to Num) that should work.
>>>>
>>>>Thanks for helping me brainstorm. ;-)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform