Preventing overwriting of specific worksheet cell through the MS Graph API - excel

I'm building a device reservation system, and was instructed to do so via Microsoft Sharepoint (to save on server hassle / cost). As such, I plan to create a daemon consuming the MS Graph API to programmatically update some Excel workbook, which will contain individual reservations (simplified example below):
Person
Device
Alice
1
Bob
2
3
However, I'm not sure how I'll address data races, since SharePoint isn't intended to work as a classic database. To illustrate this point:
Both Charlie and Eve read the workbook 'database', and sees that device 3 is available for reservation.
Charlie clicks the 'reserve' button, and his name goes to cell A3.
According to Eve, device 3 is still not reserved. She clicks the 'reserve' button.
Charlie's name gets overwritten.
I'm trying to avoid point #4 from happening, while still sticking to the desired remote Excel / Graph API combination. However, I'm struggling to come up with a solution given what I've read up on in the documentation. My thoughts have been:
Check out and check in the 'database' drive file. However, this introduces unnecessary, potentially long wait times for the 100+ other people who may be reserving the devices.
Protect / unprotect the workbook. Yet there's another relatively large drawback — as far as I understand from the documentation, the Graph API only supports protecting entire sheets, so this would require the dynamic creation / deletion of perhaps dozens of workbook worksheets, and lead to a rather complex 'database' structure.
Are there any other viable methods to dealing with potential user data writing races, without locking all the data? Or maybe some Graph API route that I'm overlooking?

Related

Is there a database specifically engineered for cross-referencing Excel like tables?

I have 500 Excel documents. I want users to keep working as if that was excel (I'll provide app for that) yet cross-reference data in-between that documents. What database can feet such needs?
So, if i get it ok then you need to get data from ~500 excel files while people may access and change them in real time! I can think of 4 ways of approach:
live links of all files to 1 workbook... hurts me to even think the maintenance and setting ... but it will be "live".
powerQuery: group them all in one data table using PowerQueries or PowerBI or similar, then load them on workbook OR save as csv... 1 button refresh, relatively quick, no actual coding needed
use VBA: access all files (or changed ones...) and get what you want, when you want it. If implemented expertly will only take a few seconds for full scan in modern pc, yet needs someone good at coding VBA.
setup 1) using VBA instead of manually, then using VBA to check for errors etc. Result will be "live" but requires again serious VBA coding...
I believe that 2) is the easiest choice with good maintenance features, ease of setting and good speed... (start in excel ...Data / new Query/from File/from Folder ...)

Excel Data Validation not processing recent cell-data from smartphone input

I have recently observed an issue regarding my data in a column that I use to perform data validation on my spreadsheet.
So There is nothing wrong with the formula, neither is there anything from with the use of data validation.
It should be looking for duplicate entries, which works quite fine.
The issue is that it no longer recognizes input made from a smartphone using the excel app.
so what i did was to retype cell text field from my PC and it worked perfectly.
Is there a way that I can continue using this technique (Data validation) without having to re-enter data from a PC in order for it to process?
Certainly! Yes, that is possible.
But... with all the possibilities in today's world, is your current strategy the one that is the best for you?
That is something I cannot answer for you.
That is something I cannot enumerate for you.
But... There is something that I can introduce to you.
PowerQuery
PowerQuery was a free add-on for Excel 2010 and 2013 and it has been baked directly into Excel for more than half a decade. So, if you're using the mobile app then you probably have a modern version of Excel with PowerQuery right at your finger tips.
Your first step if to determine how you want to make your data available for Excel to get. Go to the Data Tab on the ribbon and review your options in the "Get Extetnal Data" group.
It doesn't matter if free data is your Creed and your most intimate moments are publicly available through your raw data feed. Or if paranoia is the reason why you constantly drive around the block scraping SSIDs before squirreling them away to SQL server for detailed analysis. Or if you're using a USB cable to transfer photos to your PC because your mom walked in on you without knocking and was so disgusted by what she saw on your desktop that you're banned from the family LAN... For life. None of that matters because Excel can connect to your data in so many ways that one of them will be perfect for you.
There is a sense of familiarity when Importing your data into PowerQuery. It's not unlike following those timeless MS Wizards; but nothing like the uncanny sensation of being dropped into the PowerQuery editor. It is simultaneously the same as Excel and different from Excel and it may be the closest you ever come to visiting a parallel universe. Many of the same tools are available but they behave just slightly differently. And in some cases, like the Text To Columns tool, it is light years ahead of Excel and you will find yourself cursing at MS for not using it as a replacement for the old tool.
When you're done transforming your data, you'll have a tight clean table. But the real prize, is that you have fully automated pipe from source to product .
I figured that the phone user included extra spaces when inputting the data.
So i Used the TRIM() function which takes care of the extra spaces between, before, or after each word, and that did the job.
Therefore the major error was that there were additional spaces that was not recognized in the tested data.

CRM 2011 Merging records using dialog

Morning guys. I will try to be as short as possible.
We are using CRM 2011 on premises. Currently the way data flow works is that we have two systems (system X and System Y). System X have all customer information regarding purchase and System Y have all the information regarding customer's subscription choice. (news letter etc)
We bring these two database together and merge it in to one and then using thirdparty service, push it in to the CRM. (we process these data that's de-dups rows, checks for data quality etc)
PROBLEM start when the third type of data gets entered in by customer service. This guys uses Outlook to push data in to CRM (this are the only data that goes directly in to CRM)
This last method creates lots of duplicates and makes it imposible to use this data for better customer service and reporting.
Few important info: over 99% of data (in form of cases) entered in to CRM by customer service are of customers who already exist in CRM (These are the data that came from System X and System Y). The existing data have all the details (email, postal address etc..) but duplicate data that is entered by Customer service only have basic info like Firstname, Lastname and Email address.
what is the best solution to 1. merge these datas? and 2. Avoid duplicates when entered by customer services? I tried using dialog but it's asking end user (in customer service) to manually pick details they want to keep from each row. Some time these rows are more then 2-3.
I am sorry for making it so long but this issue seems to not going away. I am not looking for full on solution from you guys but any tips, link or if you have tried some thing like this before.
Many thanks for your time.
Have you looked at duplicate detection rules?
E.g. CRM Duplicate Detection Part 1: Configure Settings and Create Rules

call VBA macro from different computer over network

I am hoping someone might be able to help me.
My problem is essentially this: A Colleague enters information into an excel, which I then have to check and pass on by email. This is fairly time-critical.
What I would like to do is
have the colleague press a button that calls the macros on my computer (worksheet running continuously),or
have my colleague email me and I have a macro in Outlook which checks for specific subject lines, or
he saves it on the network, and I check every minute for new files in that folder.
While the last two of these are possible, the outlook solution is - for several company policy reasons - the very last resort, and I would also like to avoid the ongoing checking for files as I am already having slight performance issues (large worksheet with lots of external links that are being feed real time).
I am also open to all other suggestions someone might have. Thanks a lot!!
I'd go with the third option.
Make his workbook save information to a 'queue' file or folder. Your workbook can query this queue, which should be on the network somewhere, and notify you when its changed. Wouldn't even have to open it unless it has changed if you set it to compare modify dates, and could be small if it is saved as text or in XML format.
First option won't work because VBA framework is pretty locked down. Cross workbook macro activation isn't possible from what i understand.
Second option is more work than necessary, and VBA/Outlook will warn you every 5 minutes that its trying to access your mail folder since that's what malicious software typically does.
Like i said, the third option would be best, and his macro could be set to only write, could even encrypt the text using simple encryption methods so that others can't easily modify it if that is a concern.

Can an excel worksheet be used as UDF?

I'm building a network business model in excel. A similar model is that of Gawker Media.
In my model I have a number properties that have some over lap of audience. Each property attracts users, which in turn affords cross promotional opportunities. In the case of Gawker they have a series of blogs whose audience will likely read several of their blogs in their network.
If gawker launched a new blog they're able to direct traffic from their blog network.
Creating a model for a single blog is fairly simple - although the initial assumptions are harder. The next step is to model the network effect.
Excel provides a scenarios manager that allows me to vary the key assumptions in the basic model. This is almost perfect, I can model the launch of 10 properties, each with different launch assumptions and see the summary.
Where I need help is figuring out how I can vary the initial number of users for the launch of each property. In other words, once the network is established, its possible to drive people to any new property launched on the network.
I don't believe the scenario manager will do what I need.
So, I'm wondering if its possible to use the model work sheet as a UDF? The UDF would need to spit out the monthly revenue and unique users given a number of input assumptions.
I would then be able to create my own summary sheet for the 10 properties and using the total uniques for each property get a summary for the network. This network summary would be used to determine how many people could be driven to the launch of a new property.
In effect, the only difference to the scenario manager is that I need one of my input variables (initial users) to be programmatically generated as a function of the number of people in the network at the time of launch.
I'm hoping its possible to achieve something along these lines in excel. I could drop down and create the whole model in Java, but then its much harder to share with business colleagues!
Thanks - Matt.
You could try Data Table.
It only allows you to analyse the effect of varying 2 input parameters, but you can create several data tables, and each parameter can take hundreds of different values.
It's little know, but efficient and available since Excel 3.0.
There is a product that I have researched but never used - search for calc4web. It takes a sheet of formulas and generates code (C++) that can be compiled into an XLL add-in. Then you can call a function that does what your sheet does. But of course then you have an XLL to distribute, and a build step every time you change your logic, which defeats much of the point of using a spreadsheet.
In my case, I wound up writing some very simple VBA code to vary my sheet "inputs" using the scenario manager, and capture my "outputs". This works if you have a batch of inputs that you can just point your macro at and step through.
EDIT:
See here for a VBA-only example of doing this:
using a sheet in an excel user defined function

Resources