#### Error opening Excel file: "Could not decrypt file"

When trying to open an Excel file programmatically, I get the above error. But this only happens on one specific file. It opens correctly when using Excel. The file is definitely not encrypted. On another file, I get this error:
'filename.xls' cannot be accessed. The file may be corrupted, located on a server that is not responding or read-only.
After I cancel the operation, the debugger displays:
The Microsoft Office Access database engine cannot open or write to the file ''. It is already opened exclusively by another user, or you need permission to view and write its data. The file is not read-only and
The file is definitely not open. The server responds with other files, and both of these errors are specific to the file.
These are files I have downloaded both programmatically and by hand. The errors remain. I notice that when I view the properties for this last file, it displays only the 'General' tab.
Any suggestions on how I can fix these files?
Thnx
Will
 0
WillieMakit
8/28/2008 3:16:15 PM
asp.net.web-forms 93655 articles. 3 followers.

4 Replies
1035 Views

Similar Articles

[PageSpeed] 38

Try to save the file with a new name and run your code on the newly created file, seems that the file you have is locked by another application or process.

 0
hebakr
8/28/2008 4:15:14 PM
That sounds reasonable. The files are public infomation and if I downloaded it while someone else had it open reading it, it could indeed have these properties set. After downloading it several times, I got a copy that worked. Normally, I will be downloading the files when no one is on-line - late at night, weekends and so on.
However, this does not explain how one file can be marked as Encrypted. None of these should be. Real bummer.
Thanks for the help
Will
 0
WillieMakit
8/28/2008 6:12:07 PM
I'm not sure if this issue is related, but I had an issue with .docx and the file being corrupted coming out  of a database.  Take a look at this post to see if this is your problem and how I was able to get around it.
http://forums.asp.net/t/1301978.aspx
Also, make sure that any code that you may have that uses streams or files that closes the stream or the file.  This can cause a lock on the file...Ivan R. PerezSenior Software DeveloperITA PartnersPhiladelphia, PA
 0
perez6558
8/28/2008 6:19:36 PM
I tried making a copy of the file and unblocking it. No go. So next, I copied only the data and pasted it into a new workbook. After configuring the worksheets correctly, the file loaded as it should. So it is the file itself, not the data. I will have to wait until a new update is posted to find out if the problem persists.
I will look into the possibility that the file is actually corrupt in some way, Ivan. Out of over 50 files, this is the only one that acts this way - so far. (There are four groups of over 50 files each, all the same format, but different data.) I have not had a look at the binary of the file to see where it differs from the others. I will try looking at it with a hex editor to see if I can spot the problem, but I am not sure what can be done about it once I find the problem. Maybe just alert the folks who generate the file. But it probably won't help since it loads perfectly in Excel, and that is all they care about.
The interesting part of this problem is that all the files are generated by the same source (supposedly). It may be that the best I can do is create an error list and have someone (probably me  repair it manually).
Ah well, onward and upward. I will let you good folks know how I progress. Thanks again for all your help. If you can come up with any more suggestions, I am open.
Kindest regards,
Will

 0
WillieMakit
8/29/2008 5:12:09 AM

Similar Artilces:

"File" to "File$date" Okay... Thanks for all your answers! From all, I combinded the perfext solution: rename("test.txt", "test" . &heute() . ".txt"); sub heute { return (localtime(time))[3] . (localtime(time))[4] . = ((localtime(time))[5] 1900); } Thanks ;) Andreas -----Urspr=FCngliche Nachricht----- Von: Sudarshan Raghavan [mailto:sraghav@india.hp.com]=20 Gesendet: Samstag, 14. September 2002 15:21 An: Perl beginners Betreff: Re: AW: Rename "File" to "File$date" On Sat, 14 Sep 2002, Sudarshan Raghavan wrote: >=20 > #!/...

File write error on file "acct" in module "GWEACCT".
--____HHJZYVOOFXDLYDIWHUSF____ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 Content-Disposition: inline; modification-date="Tue, 24 Sep 2007 10:15:42 -0400" VGhlIG1vcm5pbmcgb2YgV2VkLiBTZXB0IDE5dGguIHdlIHN3aXRjaGVkIG91ciBHV0lBIG92ZXIg dG8gdmVyc2lvbiBHVzYuNSBTUDYgZnJvbSB2ZXJzaW9uIEdXNS41LiAgVGhlIG5leHQgbW9ybmlu ZyB3ZSBzdGFydGVkIGdldHRpbmcgdGhlIGZvbGxvd2luZyBlcnJvciBpbiBvdXIgR1dJQSBsb2cg ZmlsZTsNCg0KMDktMjAtMDcgMDg6MjI6MTAgMCBVbmtub3duLCBlcnJvciBjb2RlID0gODIxMA0K MDktMjAtMDcgMDg6MjI6MjEgMCBNU0cgNDAwIERlZmVycmVkIGRlbGl2ZXJ5IGZpbGUgbWVtb3J5 IGVy...

File write error on file "acct" in module "GWEACCT"
Getting this on GWIA 6.02 scrolling across the screen. Runs on a Win2ksp3 box. Searching TID's...... JG I'd probably whack most of the subdirs under gwia and let gwia rebuild. -- Michael J. Bell Novell Support Connection Volunteer Sysop Author of Guinevere (http://www.openhandhome.com) PLEASE: Do not e-mail me privately unless specifically asked. I'm a volunteer, not a Novell employee! All opinions and advice provided are MINE alone and NOT Novell's unless specifically identified as such. Novell does not officially monitor these forums. Enhance...

Rename "File" to "File$date" Hy everybody in the List! I have a Problem writing a little perl application... Im a very newbie to programming and need your help :) The Problem is: I have a file "dev.txt" and I want to rename it once a day (with a = cronjob) like "dev13092002.txt" So i need to rename it with a date variable. All I have at the moment is: #!/usr/bin/perl$d =3D date; $d =3D /pattern1(pattern2)/; sytem("cp test.txt test$d.txt"); Does anyone of you know how to do that? THANKS in advance! =09 | Telematikzentrum D=FCrrwangen GmbH &am...

Problem opening files "too many files open"
I have a Netware 6.0 SP4 server with about 20 Windows XP clients. I am connecting to the server using CIFS. I get an error message about "too many files open" when trying to access files. can anyone tell me how to fix this. Could the following apply to your problem? http://support.novell.com/cgi-bin/search/searchtid.cgi?10093040.htm -- Marcel Cox (using XanaNews 1.17.5.9) thanks for the info. it seems that my conditon has something in common with the technote. I am trying to sign into the server on all 22 machines with the same NFAP user id. i didn;t f...

Create web setup file,in project output there is only "Content files" no "Primary outputs"
Create web setup file,in project output there is only "Content files" no "Primary outputs".net bother Primary output is required in windows application, it's not required in web application. Web application need only bin folder and .aspx forms. Web setup is only for web application so if you will select content files then it will make setup which contains necessary folders (bin, app_code, etc) and .aspx pages. You don't need to add primary output.---------------------------------------------------------------------------------------------------------------...

Unable to open the physical file. Operating system error 5: "5(Access is denied.)". A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
PLEASE TELL ME A SOLUTION.... Server Error in '/PS' Application. The '/PS' is virtual directory of Local Host.Unable to open the physical file "G:\Personal Site Kit\App_Data\personal.mdf". Operating system error 5: "5(Access is denied.)".An attempt to attach an auto-named database for file G:\Personal Site Kit\App_Data\personal.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. Description: An unhandled exception occurred during the execution of the current web request. Please review th...

PB11 .NET "smart client" PUBLISH ISSUE... "Error when transfering files."
Before I start I should state that I'm not the Microsoft server admin... I have gotten this to work as recently as two days ago, but then it mysteriously stops working without any reason. It pushes most of the files out to the server correctly, but I did notice thatthe "CONFIGURATION.XML" file is missing. The "Publish Application" takes a while before failing and eventually fails with the message... "Error when transferring files." PLEASE HELP. Here is a list of what it is able to put on the server... ../publish.htm ../setup.exe ../tes...

error "cannot open file <log file>" with dbmlsync on Pocket PC
Platform: Pocket PC 2000 & 2002, ASA 8.0.2.4122 with Mobilink synchronizing via ActiveSync When dbmlsync starts up on some devices, the user gets an error message about not being able to open the log file (the Mobilink client log file, not the database log file). Our log file is always in the device root and called \TransACT.mlc, and the error message is "Cannot open file \TransACT.mlc". The DSN file for the data source is also in the device root. Our dbmlsync command line is: dbmlsync -d -k -vns -c "dsn=SomeDatabase.dsn" -ot \TransACT.mlc As you...

Convert "xls" file to "txt" file
Hi, I hope someone can help. I need to convert an Excel spreadsheet to an ASCI text file, in order to import data into a datawindow. I want to try and avoid asking users to save their files as text files and there are issues surrounding the use of ODBC to link to Excel. I am currently able to view my Excel data by way of an OLE object but if I try "Getdata", only the first 72 rows are imported to a string or blob and then subsequently to the datawindow. So I am looking for an OLE function which will "save as" my file. Help would be greatly appeciated. ...

"The selected file is not a valid Visual Studio solution file" error when opening solution from remote webserver
Hi all, This is my first post here. I have a problem I can not find the solution for. When I open a VS .NET solution file from a remote webserver (VMWare, Windows 2003 Standard) in VS.NET 2003, I get the error mentioned in the subject. When I open the same file from a local folder, it opens just fine (it's the DotNetNuke 3.0.13 solution file). I also have no problem creating a new webproject from VS.NET on the same (virtual) server, and edit and create new files in that solution / project. Any ideas why this happens?The reason I wan't to use the VMWare solution is that I'm not allowed to...

switch project from "file" to "web"?
I've taken over a project from another for a webservice. He originally set it up as "file" based, so it's showing up as "c:\path\to\site" in the solution manager. This is causing issues and it should be setup as a website with http://virtual/to/site. Is there a way to switch a file based one to a web based one and have it use IIS ?   Nevermind... just readded it manually to the solution, seemed to work Hi: I think you are talking about an ASP.NET 2.0 application? You can simply make a File System application work smoothly with IIS, by creating a new website poiting to the folder ...

"Error Creating Control" in VS.NET 2003 opening aspx files
Hi, I recently upgraded to VS.NET 2003 and when I open some of my aspx files some controls are not generated onscreen and I get a message where the control is supposed to be saying "Error Creating Control". When I hover over it it tells me that some tag is missing. Then I discovered that for some reason some characters in the source file are disappearing like instead of RUNAT=SERVER I get RUNAT=SEVER. I dont save the file and then check the original ASPX in notepad and the tag is correct and in VS.NET is not. How can I fix this? A co-worker does not have this problem on...

IDM3
Hi everybody, every once on a while, I get remoteloader error messages "Cannot write to = log file: Unable to open log file" on our domino server. Domino server = locks subsequently and needs to be restarted. Just restarting remotelader = services does not help. Anyone else seen this? Ideas? (Environment: IDM3 onOES Linux, Domino 6.5 on Win2k, 6 drivers instances) Thanke, Lothar We had similar problems and fixed them by putting the RemoteLoader on a seperate machine and just let NDSREP run on the domino server. I got the hint from Terry Nuffer and he has posted ...

How to change "File System" web site to "HTTP" Web site
I created a new web site as file based "File System". How can I change this same site to "HTTP" based web site. When createing a new website notice the Location pulldown box contains 3 options (File System, HTTP, FTP) But I do not see how to change my "File System" web site to "HTTP" when the project is alredy created and open. Please advise!! Well, you can open IIS, create a new website. Set its home directory to the Web folder of your site. Then go and create a new project using http. I don't really think you can convert between File Syst...

Object tag element opened with "Open File" -- Local File Security
Hi, I'm trying to open an html file with the object tag in it from a local file (file://) in Firefox 3.0 The html file is the following: <html> <body> <object type="audio/mpeg" data="media/where_to_begin.mp3" width="200" height="20"> <param name="src" value="media/where_to_begin.mp3" /> <param name="autoplay" value="false" /> alt : <a href="media/where_to_begin.mp3">media/where_to_begin.mp3</ a> </object> </body> <...

Shortcut Key for "File" -> "Save As File"
Hi all, We can save as DataWindow Object into .XML file through "File-> Save As File" option (after opening DataWindow Object in PB). Here I am unable to identify shortcut key for "Save As File", can any one tell me the shortcut key is available or not? if yes, could you please tell me the shortcut key for "Save As File" menu item. Advanced thanks for your help. -Siva On Feb 4, 7:45=A0pm, Siva Prasad <sivamc...@gmail.com> wrote: > Hi all, > > We can save as DataWindow Object into .XML file through "File-> Save > As...

when i open the word document through .net code "word could not create the work file" error occured
Hi All                 When i open the word 2003 document through vs.net 2005 the following error message occured."Word could not create the work file..check the environment variable" . If any one knows the solution ...please let me know asap.       This article might helphttp://www.eggheadcafe.com/software/aspnet/31165503/word-could-not-create-the.aspx  Vikram www.vikramlakhotia.comPlease mark the answer if it helped you  http://support.microsoft.com/?kbid=302629...

Setting file filter for file open dialog (to suppress showing "hidden" files, etc.)
On both my 32-bit laptop (openSUSE 11.3) and my 64-bit desktop (openSUSE 11.2) I have been unable to find out how to prevent seeing all the "hidden files" when opening files in many applications, including (for example) GIMP, Xournal, OpenOffice, gedit. In the Control Centre "File management" options "Show hidden and backup files" is NOT checked in "File Management Preferences." Thanks, John. -- j1d1w1 ------------------------------------------------------------------------ Right-click in the file dialog and uncheck Show Hidden F...

Is that need to upload "global.asax", "web.config" file to web server?
hi all...here is my problem......... Is that need to upload "global.asax", "web.config" file to web server? let say my asp.net main form is "WebForm1.aspx, after i upload WebForm1.aspx to webserver, Is that need to upload "global.asax", "web.config" or other file to the website? Hi, You need to upload your web.config file. If you are making use of your global.asax, then you need to upload the same. Making use, per say, you are storing some application variables etc., in the global.asax.vb or .cs files. Note that you don't nee...

"File Open" and "Run" with PB8 in Win98
Hi all, 1. I found that following statement works fine in PB8 with Win 2000 but cannot work (the file cannot be created, "C:\TEMP123.DAT" is a new file, ) in PB8 with Win98. li_errorlog = FileOpen("C:\TEMP123.DAT", LineMode!, write!, LockReadWrite!, append!) 2. I used 'Run' command to call a dos(.bat file), in PB8 with Win 2000, it works fine (can close the dos prompt after completion) but in in PB8 with Win 98, the dos prompt window cannot be closed even finish the job. Is there anyone can help on above issues? KW ---== Posted via the PFCGui...

How disable save file popup error message: file "could not be saved, because the source file could not be read." ; jor
When I save web pages (complete, not merely html, in order to save images) to my disk, while offline, I get about 10 pop up messages saying it can't load .js & .php files. I have to close each one of those 10 windows individually - a big waste of human time. Firefox 3.6.10 on Ubuntu Linux 10.4 Is there a way to 1) disable those info messages so they don't pop up, or 2) have ff put all the messages into merely one window, so I only have to close one window per web page. Thanks. :) = Popup window error message: {filename path to folder on disk} "could not...

Error found "Access to the path "C:\Program Files\Microsoft Visual Studio .NET\Crystal Reports\Viewers" is denied. "
Hi guys! i'm trying to solve the error "Err Msg: "Object reference not set to an instance of an object" in ASP.NET app" but when i followed the instructions in the http://community.crystaldecisions.com/library/kbase/articles/c2011144.asp link, this error appeared ""Access to the path "C:\Program Files\Microsoft Visual Studio .NET\Crystal Reports\Viewers" is denied. " What's going on? i already went to the iis to add new virtual directory (CrystalReportWebFormViewer) but different error appeared when i compile and browse my application. pls help ...

Error meessage when openning file
hey, we are "green" at ASP.net, and we have an issue when trying to open an asp.net project that was created in another computer. please asist ASAP, since we are stucked with no idea for sovling this issue.   Thanks, Moshe and Noa. an asp.net project file opened in another computer needs to point to the same URL that when it was created: if it was in, for example, http://localhost/test the new computer will have to have a virtual directory with the name of 'test' and point to where the solution file is.  "Never argue with an idiot; He will drag you down to his level ...

Web resources about - Error opening Excel file: "Could not decrypt file" - asp.net.web-forms

Resources last updated: 2/14/2016 11:36:18 PM