I've put a public survey form online through https://forms.office.com/ (Office 365)
Is there some way or API I could use to download the results spreadsheet using .NET?
I'm sorry if the question seems silly, but I couldn't find an answer in my research.
Unfortunately an API has been promised for Forms for a long time but has never arrived.
One way is to use a flow in Power Automate to save each form response to a list in SharePoint. You can either see the last week's responses there or you could have another flow with a recurrence schedule trigger set to 1 week. That would get the items created in the list in the last week and do whatever you want to do with it.
or the other way is.
You must first open the URL “https://forms.office.com/Pages/DesignPage.aspx” to obtain a token
Then you can call "https://forms.office.com/formapi/DownloadExcelFile.ashx?formid=" + put your form ID Here + "&timezoneOffset=180&minResponseId=1&maxResponseId=1000"
Related
Im trying to do something similar to the Scheduling of posts for Facebook pages... on ASP.net/c#
So basically what i need is :
User fills a few text boxes
Selects a date...
The post gets posted on that date...
I am unable to really understand the logic as well as coding for this...
What i have thought so far is, once the user submits the post, store the details in a table in SQL like SheduledPosts, and when the CurrentDate(Server Date) matches the date....
Transfer the SQL entry from there to the actual PostTable.
Now the actual process needs to take place without any pages loading or any actions done by the user... So I also dont understand how to make it happen from the server side...
Please note that im not trying to post anything to facebook... rather, trying to do a schedule form submitting on my own asp.net website...
Any help regarding the logic, coding, scheduling will be greatly appriciated...
Thank You
I can think of a couple of different ways to accomplish this:
Implement a "pending posts" table and have a separate process running on the server to take care of transferring the post from the "pending posts" table to the "current posts" table at the appropriate time.
Add a "publish_on" datetime field to your current posts table, and when selecting items to be displayed in the page output, add a "WHERE publish_on IS NULL OR publish_on > GETDATE()" clause to your query. You fill this in for posts you don't want going live until a particular time.
Personally, I would go with the second approach, since I think it's a more elegant solution.
You can do this with one table. Just have a 'Submitted' date field (for your records), a 'Publish' date field and a Boolean 'Published' field. Create a Windows Service to run every 5 minutes or so and let the service perform the date check; when it finds one that satisfies the date criteria, it just toggles the Boolean field to 'true' and your page logic can then display the post.
Here is a walk-through on creating a simple Windows Service:
https://msdn.microsoft.com/en-us/library/zt39148a%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
I'm trying to help save time at work with for a lot of tedious copy/paste tasks we have.
So, we have a propitiatory CRM (with proper HTML ID's, etc for accessing elements) and I'd like to copy those vales from the CRM to textboxes on other web pages (outside of the CRM, so sites like Twitter, Facebook, Google, etc)
I'm aware browsers limit this for security and I'm open to anything, it can be a C#/C++ application, Adobe AIR, etc. We only use Firefox at work so even an extension would work. (We do have GreaseMonkey installed so if that's usable too, sweet).
So, any ideas on how to copy values from one web page to another? Ideally, I'm looking to click a button and have it auto-populate fields. If that button has to launch the web pages that need to be copied over to, that's fine.
Example: Copy customers Username from our CRM, paste it in Facebook's Username field when creating a new account.
UPDATE: To answer a user below, the HTML elements on each domain have specific HTML ID's. The data won't need to be manipulated or cleaned up, just a simple copy from ourCRM.com to facebook.com / twitter.com
Ruby Mechanize is a good bet for scraping the data. Then you can store it and post it however you please.
First, I'd suggest that you more clearly define exactly what it is you're looking to do. I read this as you're trying to take some unstructured data from Point A and copy it to Point B. Do the names of these fields remain constant every time you do the operation? Do you need to simply pull any textbox elements from the page and copy them all over? Do some sort of filtering of this data before writing it over?
Once you've got a clear idea of the requirements, if you go the C# route, I'd use something like SimpleBrowser. Judging by the example on their Github page, you could give it the URL of the page you're looking to copy, then name each of the fields you're looking to obtain the value of, perhaps store these in an IDictionary, then open a new URL and copy those values back into the page (and submit the form).
Alternatively, if you don't know the names of the fields, perhaps there's a provided function in that or a similar project that will allow you to simply enumerate all the text fields on the page and retrieve the values for all of them. Then you'd simply apply some logic of your own to filter those options down to whatever is on the destination form.
SO we thought of an easier way to do this (in case anyone else runs into this issue).
1) From our CRM, we added a "Sign up for Facebook" button
2) The button opens a new window with GET variables in the URL
3) Use a greasemonkey script to read those GET variables and fill in textbox values
4) SUCCESS!
Simple, took about 10 minutes to get working. Thanks for you suggestions.
I have a task that basically I don't know how to accomplish it and I want some advice from you guys : I have a database that contains many binary images and a website that has a button.
When I press it a select statement is executed to search all the newly inserted rows after a specific date and send it to the website to process. My boss asked me if there is any way I can do that process manually by using a web service or anything else like a trigger in the database that automatically searches for new rows after a specific date and sends the new rows to the web site.
I don't know if I explained what I need. My main question is it possible to do this and what is the best way to achieve it. one more thing if it is achievable can I trigger it to work every day at a specific time ? Thank you
As I understood you question, these are the requirements:
You need to automate the process that is now manually triggered by clicking the button on the web page
The simplest way to do this in my opinion would be to create a small Console application and install it on a suitable server. Then on the server create a Windows task scheduler (Google it unless you're already familiar with it) task that runs the console application on a suitable schedule.
You could for instance have it run once every night at say 10 minutes past midnight and it would fetch all images from the past day and "send them to be processed".
First of all you have to understand website is not a repository of records but it works based on user requests. So in your website if you want to change contents on web pages, try AJAX reqeusts. If you are looking for some options to update details in other systems periodically think of eitehr Windows services, or cron jobs or may be SSIS jobs etc.
Use Cursor and Trigger but u have to store date in database which u want display on particular date
I am using Scorm player in my website to show the course but is there any possibilities that to store the current progress of a member and show the content which would come in next login.
basically i want to store the progress and use it in next time to tell user you cover this much area.
Yes, you can certainly do this, but it requires you to program your SCO to save the data and read it back on the next launch. You should save this data in the cmi.location or cmi.suspend_data field via the SCORM API. You also need to make sure that your run-time data is preserved for the next launch by setting cmi.exit to "suspend" to ensure that the LMS doesn't start a new attempt on the next launch.
To add to Mike's response, your content would do the following when launched a second time:
Initialize the API
Get the location data by calling a get function through the API
Display the correct content based on what was received from that get
Mike's giving you the SCORM 2004 commands. Be aware that there are SCORM 2004 and SCORM 1.2 commands and in some systems you'll want to use SCORM 1.2 rather than 2004.
my scenario is this; the user selects the list of reports they wish to print, once they select and click on the a button, i open up another page with the selected reports ready for printing. I am using a session variable to pass reports from one page to another.
first time you try it, it works fine, second time you try it, it opens the report window with the previous selected reports. I have to refresh the page to make sure it loads the latest selections.
is there a way to get the latest value from the session every time you use it? or is there a better way to solve this problem. open for suggestions...
Thanks
C# Asp.net, IE&7 /IE 8
After doing some more checking maybe if you check out COMET it might help.
The idea is that you can have code in your second page which will keep checking the server for updated values every few seconds and if it finds updated values it will refresh itself.
There are 2 very good links explaining the imlementation.
Scalable COMET Combined with ASP.NET
Scalable COMET Combined with ASP.NET - Part 2
The first link explains what COMET is and how it ties in with ASP.NET, the second link has an example using a chat room. However, I'm sure the code querying for updates will be pretty generic and can be applied to your scenario.
I have never implemented COMET yet so I'm not sure how complex it is or if it is easy to implement into your solution.
Maybe someone developing the SO application is able to resolve this issue for you. SO uses some real-time feature for the notifications on a page, i.e: You are in the middle of writing an answer and a message pops up in your client letting you know someone else has added an answer and to click "here" to refresh.
The proper fix is to set the caching directives on the HTTP response correctly, so that the cached response is not reused without validation from the server.
When you fail to specify the cache lifetime, the client has to "guess" how long the response is good for, and the browser's guess probably isn't what you want. See http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx
It's better to use URL paramaters. So you have a view of value of the paramaters.