Solved

Sharepoint Workflow: Check if document type is .xls

Posted on 2011-03-23
3
1,191 Views
Last Modified: 2012-06-27
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.
0
Comment
Question by:ultra-it
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
nsyyoung earned 500 total points
ID: 35199105
I did this just yesterday, looking for PDF files: if it's a PDF, change the content type.  Or send an email.  See the screenshot attached. Screenshot of workflow settings
0
 

Author Comment

by:ultra-it
ID: 35200268
Strangely, I tried this and thought it didnt work so I went off on one setting up calculated fields and wasting my time.

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!
0
 
LVL 8

Expert Comment

by:nsyyoung
ID: 35200276
Glad I could help.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
onenote 2016 sync 40 165
OneNote and SharePoint 10 51
General InfoPath Question - SharePoint 2010/2013 2 23
InfoPath Business days 1 22
I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now