Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to Open the password-protected xls-file and save without password Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
18-Sep-03
Category
OLE
Language
Delphi 5.x
Views
139
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Mike Shkolnik

Open the password-protected xls-file and save without password

Answer:

Today I want to show how you may load some xls-file that is password-protected, and 
how to save xls into another file but without protection.

1   var
2     xls, xlw: Variant;
3   begin
4     {load MS Excel}
5     xls := CreateOLEObject('Excel.Application');
6   
7     {open your xls-file}
8     xlw := xls.WorkBooks.Open(FileName := 'd:\book1.xls', Password := 'qq',
9       ReadOnly := True);
10    {save with other file name}
11    xlw.SaveAs(FileName := 'd:\book2.xls', Password := '');
12  
13    {unload MS Excel}
14    xlw := UnAssigned;
15    xls := UnAssigned;
16  end;


Just replace there file names and password

			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC