I note that locking a file in J does not change its contents but opening a file (while making no changes) in Excel does change its contents.
----- Original Message ----- From: Devon McCormick <[EMAIL PROTECTED]> Date: Tuesday, June 19, 2007 7:06 pm Subject: [Jbeta] Spreadsheet corruption by file locking > Is this a known problem? I was experimenting with file locking and > corrupted a spreadsheet. > Fortunately, the backup was fine. Session outlining the problem > follows. > -- > Devon McCormick, CFA > > NB. Open the following file in MS Excel: > fexist flnm=. 'C:\amisc\Money\Accounts\portfolioSince2002.xls' > 1 > ]fnum=. 1!:21 <flnm > 269700432 > fsize flnm > 195584 > 1!:31]fnum,0,fsize flnm NB. Lock the whole file... > 1 > > NB. Now, I attempt to change the spreadsheet in Excel and > NB. get a message indicating it's locked and I should save the > NB. file on which I'm working to a different name. A name is chosen > NB. for me and the file I have open in Excel is changed to this name. > > 1!:32]fnum,0,fsize flnm NB. Unlock the file. > 1 > > NB. Close the renamed spreadsheet I was working on. Try to open > NB. the original - it is now corrupt and cannot be opened in Excel. > > 1!:22 ] fnum NB. Close the file > 1 > > NB. Still corrupted. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
