I have a MSFlexgrid in my application where i have rows and columns and I tried to automate using CodedUI. And I am trying to spy the cells inside the MSFlexGrid but CodedUI is unable to spy the cells and it shows as below when tried to spy the cells it shown as Client as a ControlType. So, please help me to resolve this.
That's an ActiveX control. I don't think Coded UI has built in support. You can try the options here MSDN SOCIAL
First option, not very reliable, click the grid control in specific coordinates. It will work if you always have to select the top row and the grid sise doesn’t change rapidly.
The second option, much better functionality requires a lot of effort. You will have to wrap the grid control with a shell that implements an accessibility API to make it testable. It is a lot of work and I wouldn’t have suggested the first option if it wasn’t so difficult.
Related
I would like to display a graph on the home page of my sharepoint online site. I can add in a quick chart but it does not fit my requirements.
Basically, I have a task logger where i log all incoming tasks, they are assigned a status - closed, completed, in progress, on hold, and pending.
I would like to display this visually on the home page so we can see how many tasks per status.
I think the x axis would the status and the y axis would be the value.
I'm not sure how to achieve this? i've seen multiple examples of coding for this but being inexperienced in coding, i'm not sure how to amend or adapt the codes for my requirements.
If someone could please provide a solution or have any ideas, that would be greatly appreciated.
We can use the solution below from GitHub to achieve it.
Modern Charts
Or we can use modern script editor web part with chart js plugin and REST API to achieve your requirement.
In classic site page, we can use script/content editor web part with custom JavaScript code to achieve it.
If You don't plan to code the solution I would suggest two different then quick chart webpart approaches:
File Viewer webpart - You could create some excel file to store all Your task list there. This file could be stored on some document library. The excel file could have data in one tab and chart in other. Using File viewer You could add this excel file on any SharePoint page. On one Page You could present the tab to change data (tasks), on other the tab that has the chart. I know..a bit of a workaround but this is one of the simplest solutions I thought of without coding :)
Power BI- this tool for sure may will fit any needs as in this tool You may do almost anything. Of Course You need Power BI server for this. You may create any chart/report with this also from data taken directly from SharePoint
Hope this will be of any help to You
(Questions with an answer of NO are still useful; they're just not the solution to the problem. Answers say, no, there is no built-in, you have to implement the dialog for yourself...)
In VBA, (ms-word, or ms-excel, but seems like a generic operation) is there any way to simply a provide a collection to a built in dialog in order to prompt the user to select a value from a list of values?
I can't believe there's not a built in method to do this, it seems like a such a generic operation that could be coded once and everybody would re-use it. I can certainly hand code it, but why bother if it's already in the vba libraries someplace.
I've searched for a solution, but it does appear that the standard answer is to hand code it.
My aproach would be to create a Form, add a ListBox, Ok, Cancel and the ShowModal property.
To use it first set the ListBox RowSource according to what you need:
https://msdn.microsoft.com/en-us/library/office/ff196460.aspx
Then make it visible, manage Ok/Cancel and then use the ItemsSelect property (multiselect is possible):
https://msdn.microsoft.com/en-us/library/office/ff823015.aspx
Yup, no such thing.
Hand-code it, and keep it as part of your VBA "toolbox" - make yourself an add-in that other VBA projects can reference, so you can reuse the code without having to rewrite it every time.
Then export the code modules from your host document, upload them to a GitHub repository, and share your solution with the world so the next person looking for it doesn't need to implement it from scratch again.
The VBA standard library is rather limited, and beyond MsgBox there isn't much available in terms of built-in UI. That's just how it is.
I was wondering if anyone could help me to disable the Advanced Filter option in Excel 2013.
I have used the following to disable all other data ribbon options:
.Protect UserInterfaceOnly:=True
But advanced filter is still able to be selected. With this they can unfilter the data.
The following code used to work in older versions of Excel but I cannot seem to get it to work for Excel 2013:
Application.CommandBars("Worksheet Menu Bar").Controls _
("&Data").Controls("&Filter").Controls("&Advanced Filter...").Enabled = False
If anyone could help me out with this or point me in the right direction then it would be appreciated.
Thanks guys.
Solution Suggested
The approach will be hiding the button from the user interface: the advantage on this solution is that the code is not in VBA (entirely) so, is not that easy for the user to modify it (or know what is going on backstage).
Answer Explanation/Next steps
It's really a deep answer with many steps involved in it so, I'll just post guidance and some useful links, that way you may research about it first.
1. Download Custom UI Editor for Microsoft Office: this helps to modify the user interface for the document.
2. Look for tutorials; start to code there with something basic like adding a tab and a button, (this is a good one)
3. Back to Excel, look for life cycle and custom events, this is a good place to start
4. You'll need to catch the event when the Ribbon is loaded; in that time, you'd need to disable the button, these links (1,2) are useful to show the steps and some example workbooks for it.
5. Locate the ID for the button and disable it (Hint: The idMSO = AdvancedFilterDialog, if you 've followed the previous steps, it will make sense here-).
Further information/Answer Disclaimer
Excel is not a software that can handle security deeply; if you are trying to restrict the user somehow in the original file, you should try other approaches -IG: a copy of a workbook for reference only, while the master one is saved in a sharepoint only modifiable by people authorized for it-.
While FAQ in S.O is strict about referencing to other sites without using a proper reference for it, this is a deep step solution that would take pages to explain even a random example; appealing to the guiding topic, this answer should be ok.
We want to "Categorize" our work orders more systematically. So far, we've been using Description, but we feel it is not a reliable way. We were hoping to use Failure Class as a starting point, but we find that having on a different tab discourages technicians and the help desk from classifying the work order.
Is it possible to add/duplicate the Failure Class field to Work Order Tracking screen?
Normally, I wouldn't ask, but was not clear if this was possible because Failure Class, Codes, and Tracking are different tables in Maximo. So, I wasn't sure how this would work exactly...
The simple answer is to use Application Designer's copy / paste functionality to duplicate the field. The specific field in question is on the top level of the Work Order Tracking application and facilitates interaction with the FAILURECODE attribute of the Main Object of the application, which is WORKORDER. Therefore, a copy / paste operation should be all you need. (Note: Application Designer's copy / paste functionality is used via that application's toolbar buttons, not Ctrl+C / Ctrl+V.) And if using Application Designer's copy / paste functionality doesn't work to your satisfaction, I would recommend exporting the XML for the application, copying the line of XML as desired and giving it a unique id, and importing the updated XML back in to Maximo. (Application Designer has toolbar buttons for exporting and importing an application's XML.)
You mentioned difficulty getting users to fill it in as a driver for asking the question. Another solution, which you can do as well as or instead of copying the field, is to specify the Failure Class on each Asset. Then, when an Asset is put on a Work Order, its Failure Class will be copied over, saving the users work and risk of not choosing correctly. And another idea is to highlight the Failure tab until a Failure Class is supplied.
And you also mentioned that the driver behind getting them to fill in the Failure Class, and etc, was to help categorize work. To that point, you should know that Failure Classes, in specific, and Failure Codes, in general, are intended to be used to help you determine what's going wrong with your assets, how often, and how the problems are being fixed. So, using them to categorize work is a bad idea. Instead, you should be using the Work Type field and Classifications, because categorizing work is what these are meant to be used for. The Work Type field is already on the Work Order tab, and Classifications fields are on the Specifications tab. You could copy the Classifications fields the same as I directed above for the Failure Class field.
I have a link in one column and, based on it, I want
Number of Google searches in column 2
Page rank of first result in column 3
I know this can be done, as I saw a friend pulling google search result right in Excel. If anyone knows, please share how I could do that.
If I correctly interpret your question, one of the tasks you had to do is
How do I get programmatically the Google page rank for a list of URLs?
You can find the code to do this in this CodeProject article:
Request Google´s Pagerank programmatically
Regarding the Excel part: it depends which programming framework or platforms you could use. You could use to create a .NET extension for Excel using the Microsoft Visual Studio Tools for Office.
From Excel there is Data->Get External Data->New Web Query. Is this what you want?
You have two options, both of which are unfortunately poorly documented.
If you are comfortable in C/C++, you can write a special DLL called an "XLL" that you can call during Excel runtime. There is some sparse documentation available. Note that this stuff isn't very fun to use.
If you prefer .NET, there is a binding for the entire Office suite outlined here that allows you to write COM-based methods that you can call from Office. It is intended for automation, but you can write any managed code you want and have Excel call into it.
There is also what Remou just suggested; I don't actually own a copy of Excel to test that out, but it may be the easiest option.
By link i meant keywords and not URL. I want to put a keyword in one cell and pull number of searches and page rank in adjacent cells.
I tried doing the same with web query in excel but i can only reach till the number of searches. that too not in the proper cell (trying to figure out). But i have no clue about how to get the pageranks.
I am not that tech savvy to code a binder or plugin for myself. Although i am checking the link by splattne. Please focus more light on it. Is it gonna be time consuming if i try to make this one..?
Regards
Thinkjayant
There are some nice plugins for this (in various languages) on GitHub:
http://github.com/search?langOverride=&language=&q=pagerank&repo=&start_value=1&type=Repositories&x=0&y=0
I have a PR checker functions in my Excel plugin "SeoTools".
http://nielsbosma.se/projects/seotools/