Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default 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






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default 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










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
When saving to PDF...the PDF file moves my signature text block? Dan Excel Discussion (Misc queries) 2 July 29th 09 06:30 PM
Signature or Logo Vercingetorix.XIII[_2_] Excel Worksheet Functions 3 September 23rd 08 10:01 PM
signature line pdaws Excel Worksheet Functions 3 September 23rd 08 09:52 PM
Automatically add my signature file to emails sent from Excel? kejelj Excel Discussion (Misc queries) 1 February 9th 07 09:32 PM
How do I add a signature Penfold Excel Discussion (Misc queries) 1 February 14th 05 07:11 PM


All times are GMT +1. The time now is 11:07 PM.

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"