Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Re: Nameless Excel Spreadsheet
Message
From
05/11/2002 18:32:56
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00718854
Message ID:
00719104
Views:
16
>>>If the sheets are not large, you might want to think about using Excel automation to populate and name the sheet for you; put the data into your XLS spreadsheet, open a new workbook using automation, and then copy the XLS (or DBF - Excel can read a DBF file) into the proper cells, or open the XLS you create using automation and then rename it via Save As before exposing it to the user to edit.
>>
>>The problem here is that the "Save" command still won't be disabled - I only want the user to have access to the file to have a filename - IOW, if the user presses "Save", I want the "SaveAs" dialog to appear; I do not want the user to overwrite some temporary filename.
>>
>>I was looking for some "Insert from File" command, but this seems to be available only in MS-Word, not in Excel.
>
>You could try using DataToClip and have them paste that to a spreadsheet of their choice, or writing a VBA macro to override the Save dialog and invoke the SaveAs dialog. And then there is the easy route - invoke PutFile() from VFP to get the name the user wants to give to the spreadsheet before you write it....

Thanks. The "easy route" is what I started doing, but one user complained - rightfully, IMO - about the additional nuisance of having to save a file when, perhaps, he only wanted to see it on the screen.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform