ultra-it
asked on
Sharepoint Workflow: Check if document type is .xls
Hi there,
I'd like to know if there is a way to check a documents file type extension within a document library using a workflow (created with SPD2007).
I have a .xls template that is used for data collection, when users with Office 2007 and 2010 save the document without checking it, it can easily be saved as .xlsx. This causes problems further down the line when users with Office 2003 check out the document and are unable to save it properly, even with the conversion pack.
As such, if there is a way to check that that extension is .xls and reject it if it is .xlsx, I'd like to implement it.
There is the If filetype is specific type condition within SPD2007 but I believe this refers to the Sharepoint Library file type?
Other than that, I was thinking it might be possible to check this by dumping the full document name e.g document.xls into a string and extracting the last 3 characters (xls). THis could then be checked using another function and if incorrect (lsx) would be rejected.
I'm not the best one with expressions of this kind however and I'd appreciate it if someone could tap up an example if possible?
Thanks in advance.
I'd like to know if there is a way to check a documents file type extension within a document library using a workflow (created with SPD2007).
I have a .xls template that is used for data collection, when users with Office 2007 and 2010 save the document without checking it, it can easily be saved as .xlsx. This causes problems further down the line when users with Office 2003 check out the document and are unable to save it properly, even with the conversion pack.
As such, if there is a way to check that that extension is .xls and reject it if it is .xlsx, I'd like to implement it.
There is the If filetype is specific type condition within SPD2007 but I believe this refers to the Sharepoint Library file type?
Other than that, I was thinking it might be possible to check this by dumping the full document name e.g document.xls into a string and extracting the last 3 characters (xls). THis could then be checked using another function and if incorrect (lsx) would be rejected.
I'm not the best one with expressions of this kind however and I'd appreciate it if someone could tap up an example if possible?
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad I could help.
ASKER
Just tried this again about 10 minutes ago and after about 10 tests, seems to work 100%.
Sorry Microsoft, some harsh words were said about you during this period.
Thanks for the info!