Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying a memo into Excel sheet
Message
From
08/10/2004 10:10:17
 
 
To
07/10/2004 09:43:21
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00949002
Message ID:
00949884
Views:
6
Cetin,

We are limited to transfer 1 memo only to Excel, true?? I remember that was the case.
Do you if this changed in any version after 7?

Mo

>You could temporarily copy to a table and use it or use clipboard transfer. Serach for old messages doing that with clipboard transfer (setting values cell by cell should be the last thing to try).
>For reverse you could use Oledb connection to excel, save it as dbfIII etc.
>Cetin
>
>>Cetin, thanks a lot amigo
>>
>>is there a way to do teh same export using cursor instead of a table in a database. I could not figure this one out.
>>
>>How about doing teh opposite, moving data from Excel to a memo in VFP.
>>
>>Thanks
>>Mo
>>
>>>>Hello
>>>>
>>>>Using VFP7, is there a way to move large memo to Excel cell other than breaking the memo into 254 char length?
>>>>
>>>>Mo
>>>
>>>There are multiple ways. One is passing a recordset:
>>>
>>>Local oRS as AdoDB.Recordset,oRS2 as AdoDB.Recordset,oCon as AdoDB.Connection
>>>oCon = CreateObject('ADODB.connection')
>>>oCon.ConnectionString = "Provider=VFPOLEDB;Data Source="+_samples+"data\testdata.dbc"
>>>oCon.Open
>>>oRS = oCon.Execute('select * from employee')
>>>oRs.Save('disconnectme.rst')
>>>
>>>oRS2 = CreateObject('ADODB.Recordset')
>>>oRs2.Open('disconnectme.rst')
>>>
>>>oExcel = Createobject('Excel.Application')
>>>With oExcel
>>>  .Workbooks.Add
>>>  .Visible = .T.
>>>  .ActiveWorkbook.ActiveSheet.QueryTables.Add( oRS2, .Range("A1")).Refresh
>>>Endwith
>>>oRs2.Close
>>>Erase 'disconnectme.rst'
>>>
Also check passing a table/view in FoxyClasses.
>>>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform