Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP to Excel data format problem
Message
From
09/01/2001 11:47:00
 
 
To
09/01/2001 11:40:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00461214
Message ID:
00461225
Views:
11
Sorry...let me see if i can explain this better.
When the user clicks on "save to excel" it calls a blank template that we have set up which is what they will use.
Then we create an Excel Object "x1 = CREATEOBJECT("EXCEL.APPLICATION")".
Using this object we do some fox table data tweeking to get exactly what we want to dump into excel. Once that is all done we have the "DO Excel WITH".

Here is some sample code that I am thinking is are ODBC calls (?):

x1.Workbooks.Open('path'+'xtab1.xls')
x1.Sheets("xtab1").Name = "Legend"
....
x1.Cells.Replace("|", ",", 2, 1, .f.)

x1.Columns("C:F").Select
x1.Selection.Insert(-4152)

I hope this helps.


>Huh, what? OK....explain this whole thing in a bit more detail. I think there is a solution to your problem but the problem is vague :-)
>
>>Looks like it is probably ODBC...then there is a 'DO Excel WITH...' call which is when Excel actually opens.
>>
>>
>>>How are you "saving into Excel"?
>>>
>>>>I have a FoxPro table that I am saving into Excel. Some numerical fields in FoxPro have to be set as Char to allow the correct amount of decimal points to show. When this data is saved into excel, it does not allow you to format the fields to change them to number so that analysis may be done. The only way to change them is to edit every field. I can't seem to figure out why it won't allow me to change the formatting. Something seems to be holding the char format in Excel.
>>>>
>>>>Any ideas?
>>>>
>>>>Thanks!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform