Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 2 xls files the same, but not the same

I run a daily backup that uses the file modified dates and file sizes to
determine whether to refresh an archived file. I tested this recently by
doing a binary compare between what should be an exact replica of the
directory, and the actual directory, to my suprise 5 out of 40 excel files
show a difference.

In all 5 files this difference is 6 bytes long, and for two of the files the
difference starts at file offset 0x46c. All files seem to open fine with
excel.

My first guess would be that this is a hash code windows writes to the
physical file once it is opened to handle the event of another excel instance
(or user) opening the same file. The problem is I can't seem to verify this.

Does anyone have any thoughts on what this difference might be? If not, can
you point me somewhere to find the answers I seek.

Thanks in advance,

Ryan

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default 2 xls files the same, but not the same

Do some searching around for the format of BIFF (BInary File Format) and look
for BIFF5 or BIFF8 - these are the file format descriptions for Excel files.
I'm not sure what the current BIFFx used for say Excel XP, but someone will
probably come along and let us both know.

There's also a very interesting commentary on Excel file formats at this page
http://www.robweir.com/blog/2007/01/...xcel-2007.html
which discusses the radical change in the file formats used in Excel 2007.

"ryan_w" wrote:

I run a daily backup that uses the file modified dates and file sizes to
determine whether to refresh an archived file. I tested this recently by
doing a binary compare between what should be an exact replica of the
directory, and the actual directory, to my suprise 5 out of 40 excel files
show a difference.

In all 5 files this difference is 6 bytes long, and for two of the files the
difference starts at file offset 0x46c. All files seem to open fine with
excel.

My first guess would be that this is a hash code windows writes to the
physical file once it is opened to handle the event of another excel instance
(or user) opening the same file. The problem is I can't seem to verify this.

Does anyone have any thoughts on what this difference might be? If not, can
you point me somewhere to find the answers I seek.

Thanks in advance,

Ryan

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 663
Default 2 xls files the same, but not the same

Excel has two types of referencse, they a
1. Relative reference
2. Absolute reference

Relative reference:
If you want to find the product of two cell values, Al and B1 in cell C1, A2
and B2 in cell C2, A3 and B3 in cell C3, A4 and B4 in cell C4, you have enter
a formula in cell C1 as follows:
1. Enter "="
2. Press Ctrl and select cell A1 press the * and then select B1.
Your formula should look like this =A1*B1
3. Press Enter
4. Select cell C1
5. Click and drag till C4
you will notice the formula is applied automatically to all cells between C2
to C4. This is done using Relative reference.

Absolute Reference
It is defined as the absolute position of value within a cell using the =$B$4.
If you copy any cell value and paste in a different cell location using the
Paste link option under the Paste dialog box, that value becomes a absolute
reference cell value.

Challa Prabhu

"ryan_w" wrote:

I run a daily backup that uses the file modified dates and file sizes to
determine whether to refresh an archived file. I tested this recently by
doing a binary compare between what should be an exact replica of the
directory, and the actual directory, to my suprise 5 out of 40 excel files
show a difference.

In all 5 files this difference is 6 bytes long, and for two of the files the
difference starts at file offset 0x46c. All files seem to open fine with
excel.

My first guess would be that this is a hash code windows writes to the
physical file once it is opened to handle the event of another excel instance
(or user) opening the same file. The problem is I can't seem to verify this.

Does anyone have any thoughts on what this difference might be? If not, can
you point me somewhere to find the answers I seek.

Thanks in advance,

Ryan

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 620
Default 2 xls files the same, but not the same

As a matter of interest, what does the Ctrl key do for you at step 2? I
don't use it, and I can't see any difference in result.
--
David Biddulph

"challa prabhu" wrote in message
...
....
Relative reference:
If you want to find the product of two cell values, Al and B1 in cell C1,
A2
and B2 in cell C2, A3 and B3 in cell C3, A4 and B4 in cell C4, you have
enter
a formula in cell C1 as follows:
1. Enter "="
2. Press Ctrl and select cell A1 press the * and then select B1.
Your formula should look like this =A1*B1
3. Press Enter
4. Select cell C1
5. Click and drag till C4
you will notice the formula is applied automatically to all cells between
C2
to C4. This is done using Relative reference.

....


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default 2 xls files the same, but not the same

isn't this meant to be a reply to one of the other questions :)
Steve

On Wed, 31 Jan 2007 07:14:01 -0000, challa prabhu
wrote:

Excel has two types of referencse, they a
1. Relative reference
2. Absolute reference

Relative reference:
If you want to find the product of two cell values, Al and B1 in cell
C1, A2
and B2 in cell C2, A3 and B3 in cell C3, A4 and B4 in cell C4, you have
enter
a formula in cell C1 as follows:
1. Enter "="
2. Press Ctrl and select cell A1 press the * and then select B1.
Your formula should look like this =A1*B1
3. Press Enter
4. Select cell C1
5. Click and drag till C4
you will notice the formula is applied automatically to all cells
between C2
to C4. This is done using Relative reference.

Absolute Reference
It is defined as the absolute position of value within a cell using the
=$B$4.
If you copy any cell value and paste in a different cell location using
the
Paste link option under the Paste dialog box, that value becomes a
absolute
reference cell value.

Challa Prabhu

"ryan_w" wrote:

I run a daily backup that uses the file modified dates and file sizes to
determine whether to refresh an archived file. I tested this recently
by
doing a binary compare between what should be an exact replica of the
directory, and the actual directory, to my suprise 5 out of 40 excel
files
show a difference.

In all 5 files this difference is 6 bytes long, and for two of the
files the
difference starts at file offset 0x46c. All files seem to open fine
with
excel.

My first guess would be that this is a hash code windows writes to the
physical file once it is opened to handle the event of another excel
instance
(or user) opening the same file. The problem is I can't seem to verify
this.

Does anyone have any thoughts on what this difference might be? If
not, can
you point me somewhere to find the answers I seek.

Thanks in advance,

Ryan




--
Steve (3)


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 837
Default 2 xls files the same, but not the same

Excel .xls files store date and userID of the last access (even if no changes
were "saved"). This would account for the minor binary compare differences
you are seeing among files with the same size and date/time stamp.

There is one other potential issue with your scheme. When Excel opens an
..xls file with write access, it immediately changes the date/time stamp to
the current date and time, and only changes them back when the file is closed
normally. Thus if Excel crashes, there is a power glitch to the user's
terminal, etc., the date/time stamp will remain permanently changed even
though there were no changes saved. The only way I know of to avoid this
problem is to set the Read Only attribute for the file.

Jerry

"ryan_w" wrote:

I run a daily backup that uses the file modified dates and file sizes to
determine whether to refresh an archived file. I tested this recently by
doing a binary compare between what should be an exact replica of the
directory, and the actual directory, to my suprise 5 out of 40 excel files
show a difference.

In all 5 files this difference is 6 bytes long, and for two of the files the
difference starts at file offset 0x46c. All files seem to open fine with
excel.

My first guess would be that this is a hash code windows writes to the
physical file once it is opened to handle the event of another excel instance
(or user) opening the same file. The problem is I can't seem to verify this.

Does anyone have any thoughts on what this difference might be? If not, can
you point me somewhere to find the answers I seek.

Thanks in advance,

Ryan

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 2 xls files the same, but not the same

Thank you for the responses.

There is something that I should have mentioned in my first post though.

My archive is compressed. The program I use (7zip) to create the compressed
archive lets me specify a base archive. If the modified timestamp and the
file size are identical the already compressed file is copied directly from
the base archive, otherwise it is compressed from the network drive and added
to the archive. This sounds like it would be a fairly complex process to
program, and that makes me a little nervous.

Jerry, I noticed that excel changes the modified date while it is open.
This doesn't affect the backup since it looks for an identical timestamp, I
have verified this. However, this invalidates my last theory about what I
though was happeneing.

My theory was:

1. User opens the file
2. Makes some changes
Excel writes some state information to physical file
3. Backup process runs
4. Person closes the file, without saving changes

Now I realize that the open file would have a different modified date, and
so get added to the days archive. But when it is closed without being saved
the date should revert, and be added to the next days archive since the dates
don't match again.

I don't know if I should worry about this or not. I think my problem
revolves around the question of whether or not excel would ever change the
physical file, without changing the modified date. Maybe if the excel
crashes. I dunno.

Ryan


"Jerry W. Lewis" wrote:

Excel .xls files store date and userID of the last access (even if no changes
were "saved"). This would account for the minor binary compare differences
you are seeing among files with the same size and date/time stamp.

There is one other potential issue with your scheme. When Excel opens an
.xls file with write access, it immediately changes the date/time stamp to
the current date and time, and only changes them back when the file is closed
normally. Thus if Excel crashes, there is a power glitch to the user's
terminal, etc., the date/time stamp will remain permanently changed even
though there were no changes saved. The only way I know of to avoid this
problem is to set the Read Only attribute for the file.

Jerry

"ryan_w" wrote:

I run a daily backup that uses the file modified dates and file sizes to
determine whether to refresh an archived file. I tested this recently by
doing a binary compare between what should be an exact replica of the
directory, and the actual directory, to my suprise 5 out of 40 excel files
show a difference.

In all 5 files this difference is 6 bytes long, and for two of the files the
difference starts at file offset 0x46c. All files seem to open fine with
excel.

My first guess would be that this is a hash code windows writes to the
physical file once it is opened to handle the event of another excel instance
(or user) opening the same file. The problem is I can't seem to verify this.

Does anyone have any thoughts on what this difference might be? If not, can
you point me somewhere to find the answers I seek.

Thanks in advance,

Ryan

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 2 xls files the same, but not the same

Nevermind, I managed to reproduce it.

1. Make a new excel worksheet
2. Make sure it is closed
3. Make a backup copy of it - This is what is added to my archive
4. Open it again
5. Change some stuff
6. Close it without saving - This is the working file
7. Compare them (QVerify works well, and no install)

Voila, the two files show identical modified dates and file sizes and are
for all intents identical, but they are nevertheless different. Excel must
have a loose interpretation of what it means for a file to be modified.

I do see that the Last Accessed date is changed, maybe I can use that, or
have faith that Excel will know what to do.

Thanks for the input

Ryan


"ryan_w" wrote:

I run a daily backup that uses the file modified dates and file sizes to
determine whether to refresh an archived file. I tested this recently by
doing a binary compare between what should be an exact replica of the
directory, and the actual directory, to my suprise 5 out of 40 excel files
show a difference.

In all 5 files this difference is 6 bytes long, and for two of the files the
difference starts at file offset 0x46c. All files seem to open fine with
excel.

My first guess would be that this is a hash code windows writes to the
physical file once it is opened to handle the event of another excel instance
(or user) opening the same file. The problem is I can't seem to verify this.

Does anyone have any thoughts on what this difference might be? If not, can
you point me somewhere to find the answers I seek.

Thanks in advance,

Ryan

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default 2 xls files the same, but not the same

As far as the loose interpretation of what constitutes a change and what
doesn't - you're correct, it seems to be a pretty simple toggle type thing -
if you change something, even if you then undo it, Excel marks the file as
changed and will give you the save changed file option if you then just try
to close it.

Good luck.

"ryan_w" wrote:

Nevermind, I managed to reproduce it.

1. Make a new excel worksheet
2. Make sure it is closed
3. Make a backup copy of it - This is what is added to my archive
4. Open it again
5. Change some stuff
6. Close it without saving - This is the working file
7. Compare them (QVerify works well, and no install)

Voila, the two files show identical modified dates and file sizes and are
for all intents identical, but they are nevertheless different. Excel must
have a loose interpretation of what it means for a file to be modified.

I do see that the Last Accessed date is changed, maybe I can use that, or
have faith that Excel will know what to do.

Thanks for the input

Ryan


"ryan_w" wrote:

I run a daily backup that uses the file modified dates and file sizes to
determine whether to refresh an archived file. I tested this recently by
doing a binary compare between what should be an exact replica of the
directory, and the actual directory, to my suprise 5 out of 40 excel files
show a difference.

In all 5 files this difference is 6 bytes long, and for two of the files the
difference starts at file offset 0x46c. All files seem to open fine with
excel.

My first guess would be that this is a hash code windows writes to the
physical file once it is opened to handle the event of another excel instance
(or user) opening the same file. The problem is I can't seem to verify this.

Does anyone have any thoughts on what this difference might be? If not, can
you point me somewhere to find the answers I seek.

Thanks in advance,

Ryan

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening files in folders and subfolders bestie22 Excel Discussion (Misc queries) 1 September 19th 06 05:23 PM
Seemingly random .tmp files lbour New Users to Excel 3 August 14th 06 11:17 PM
How to update destination file with source files closed? Alex Costache Excel Discussion (Misc queries) 2 August 1st 06 10:08 AM
merging my excel files Donna YaWanna Excel Discussion (Misc queries) 1 June 14th 05 12:53 AM
Cannot access read-only documents. tomgillane Excel Discussion (Misc queries) 14 February 7th 05 10:53 PM


All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"