Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy a cursor to a spreadsheet
Message
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01175581
Message ID:
01203348
Views:
25
>>>>Cetin,
>>>>
>>>>I was wondering if I could ask you a question regarding the code above (great function to copy data from VFP to Excel, thank you!).
>>>>
>>>>When I run your code it opens Excel and copies the data to a spreadsheet. But if I wanted to creat this spreadsheet in a specific folder under a specific name and not to open the spreadsheet, is it possible? In this case, where do I need to make changes in your code?
>>>>
>>>>Thank you.
>>>
>>>Just remove WorkSheets(1).Activate() and visible and add
>>>.ActiveWorkBook.SaveAs(m.lcExcelFile) at the end.
>>
>>Thank you very much, Naomi.
>
>Done that yesterday <g> BTW, another little catch here - CHR(13)+CHR(10) in Memo fields should be replaced with CHR(10) to be properly shown in Excel.

I did see your message to Cetin about the CHR(13)+CHR(10) and I added it to my code. Thank you.

I just made the changes you suggested. It works. But somewhere I need to close this spreadsheet after saving it. Because, after I created the spreadsheet file, when I open it with Excel, I get message that the file is locked and it can be opened in ReadOnly way.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform