Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove password automatically
Message
From
09/12/2008 16:59:33
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01366281
Message ID:
01366316
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>Suppose, I have an Excel file that may or may not be protected with a known password. What should I do to be able to do APPEND FROM it?
>
>Thanks in advance.

Using automation you can pass the password as one of the parameters:
oXL = CREATEOBJECT("Excel.Application")
oXLBooks = oXL.Workbooks				
oXLBooks.Open(cFileName [, nUpdateLinks [, lReadOnly [, nFormat ;
      [, cPassword [, cWriteResPassword [, lIgnoreReadOnlyRecommended ;
      [, nOrigin [, cDelimiter [, lEditable [, lNotify ;
      [, nConverter]]]]]]]]]]])
From:

http://support.microsoft.com/kb/160064

I'm assuming you've tried the append from command and it fails?

APPEND FROM [My Server or Path To\MySpreadsheet.xls] TYPE XL5 && or the appropriate type you are reading from

I don't think there is anyway to remove a password programmatically though without already knowing it in advance to connect and open the spreadsheet. That would defeat the purpose of a password.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform