![]() |
File signature
Hi
I have a process that requires a user to open one of several different xls files, each has a specific format and I wish to decide which type of file the user has opened. Row one comprises a set of column headings which for each file type should be the same, I plan to store a signature based on these headings and check the file just opened against each of these signatures. My question is what is best way of creating these signatures ? I had considered using a concatenation of each column heading (trimmed) but in some cases the signature is over 1000 characters. Is there some form of encoding I can use to convert these into a shorter string that will detect the file type and most cases spot if the user opens a un-recognised file type or the source file headings have changed in some way? TIA -- Cheers Nigel |
File signature
Why not use a DocumentProperty? It's simple, unambiguous, and easy to work
with... "Nigel" wrote in message ... Hi I have a process that requires a user to open one of several different xls files, each has a specific format and I wish to decide which type of file the user has opened. Row one comprises a set of column headings which for each file type should be the same, I plan to store a signature based on these headings and check the file just opened against each of these signatures. My question is what is best way of creating these signatures ? I had considered using a concatenation of each column heading (trimmed) but in some cases the signature is over 1000 characters. Is there some form of encoding I can use to convert these into a shorter string that will detect the file type and most cases spot if the user opens a un-recognised file type or the source file headings have changed in some way? TIA -- Cheers Nigel |
File signature
Regrettably the files to open are created elsewhere and this property is not
set. I have no control over it. -- Cheers Nigel "Jezebel" wrote in message ... Why not use a DocumentProperty? It's simple, unambiguous, and easy to work with... "Nigel" wrote in message ... Hi I have a process that requires a user to open one of several different xls files, each has a specific format and I wish to decide which type of file the user has opened. Row one comprises a set of column headings which for each file type should be the same, I plan to store a signature based on these headings and check the file just opened against each of these signatures. My question is what is best way of creating these signatures ? I had considered using a concatenation of each column heading (trimmed) but in some cases the signature is over 1000 characters. Is there some form of encoding I can use to convert these into a shorter string that will detect the file type and most cases spot if the user opens a un-recognised file type or the source file headings have changed in some way? TIA -- Cheers Nigel |
File signature
You could hash them (Google will give you any number of hashing algorithms).
Or run a test and check how many of these headings you need to concatenate to create a unique identifier. "Nigel" wrote in message ... Regrettably the files to open are created elsewhere and this property is not set. I have no control over it. -- Cheers Nigel "Jezebel" wrote in message ... Why not use a DocumentProperty? It's simple, unambiguous, and easy to work with... "Nigel" wrote in message ... Hi I have a process that requires a user to open one of several different xls files, each has a specific format and I wish to decide which type of file the user has opened. Row one comprises a set of column headings which for each file type should be the same, I plan to store a signature based on these headings and check the file just opened against each of these signatures. My question is what is best way of creating these signatures ? I had considered using a concatenation of each column heading (trimmed) but in some cases the signature is over 1000 characters. Is there some form of encoding I can use to convert these into a shorter string that will detect the file type and most cases spot if the user opens a un-recognised file type or the source file headings have changed in some way? TIA -- Cheers Nigel |
All times are GMT +1. The time now is 10:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com