Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo fields and Excel
Message
From
20/05/2002 09:50:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Memo fields and Excel
Miscellaneous
Thread ID:
00658848
Message ID:
00658848
Views:
73
I have an application where I am letting the user pick the fields to use for an excel spreadsheet. I am using the copy to command to create the xls speadsheet. The memo will not transfer over to the spreadsheet using this method so I want to add the memo field in the last column of the spreadsheet using ole automation as follow. In trying to test the process I used the following code assuming the user had selected 7 fields including the memo field and I want the memo field to appear in column G.
    olapp = CREATEOBJECT("Excel.application")
    
	SELECT mytable
	   WITH olapp
	   .workbooks.open('C:\myxlsfile')
	   .range("G2").rows.autofit
	   .range("G2").value = mytable.ts_memo
	   .range("G2").wraptext =.t.
	   .Visible = .T.
	   endwith
I can get the memo field to display in the spreadsheet. However its appearance is as follows:

The text is diplayed with a small square box displayed before the text and a square box displayed after the end of the text. The text appears to be contained in a container and appears to be centered in the container and thus the row spacing is very large. The cell is formatted as a general cell, changing it to text does not change it. I have commented out the autofit and wraptext command and run the routine several times and they appear to have no affect on the way the memo field is displayed, that is the appearance of the square boxes and the fact it appears to be in a container persists.


Any one have any suggestions.


Gaylen
Next
Reply
Map
View

Click here to load this message in the networking platform