I'm developing an add-in for Excel using the Office Add-ins platform. In this add-in I'm writing data to a range using the setSelectedDataAsync** function. It works fine, but after the data is written, I'm not able to delete or edit the cells (although I can select new ranges) unless I click anywhere outside the worksheet or double click a cell. I think it is an issue with Excel not regaining focus correctly (the filename in the top of the app remains grayed out).
Some users seem to think that Excel becomes unresponsive, which is a problem.
Is this a known issue? Is there a work around for this?
** I have noticed that setSelectedDataAsync is way, way quicker than setting range.values to a matrix and then ctx.sync(). Am I losing some important functionality by not using the latter method?
This is not a known issue (unable to interact with worksheet after setting the data). We can look into that.
Surprised to hear that setSelectedDataAsync works faster than the range.values set. The batched syntax allows you to combine not just one instruction, but many related instructions such as setting number format, font, background, etc. and you can do a single sync() to send all instructions in one batch. So, it is more efficient when you combine related instructions together.
There is no restriction of which API to use as such; however the Excel1.1 version was introduced with Office 2016 and then there have been many releases since then incrementally adding new features along the way.
setSelectedDataAsync() API was designed to work across hosts such as Excel, Word, etc. and hence doesn't go deeper in-terms of setting number format, formats, etc.
Related
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 ...)
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.
How do I change the Calculation Mode between manual and automatic?
In the March 5th Graph API Community Call, Joe Zhoa (slide 21) indicated you can set the CalculationMode (Auto-reCalc). However, I cannot figure out how. And I can't find any documentation on it (I also looked in beta documentation).
If it's not released yet, when might it be?
I am interested in setting CalculationMode to manual when setting multiple values, then have it calculate before getting values. I'm hoping it will help to improve performance when we need to set values into multiple ranges. Currently using DependsOn and/or small batch sizes is quite slow. I am hoping that with CalculationMode set to manual, we can set multiple values concurrently in batches of 20 (or more when supported) without dependsOn.
I agree that the entire calculation feature is not quite clear. I was able to change the calculation mode only by opening the workbook in Excel, setting the calculation mode to manual in the Options menu and saving back to Sharepoint.
After that, if you GET
https://graph.microsoft.com/beta/me/drive/items/{id}/workbook/application
, it will return "calculationMode": "Manual".
To calculate, POST https://graph.microsoft.com/beta/me/drive/items/{id}/workbook/application/calculate.
See:
https://learn.microsoft.com/en-us/graph/api/workbookapplication-get?view=graph-rest-beta&tabs=cs
https://learn.microsoft.com/en-us/graph/api/workbookapplication-calculate?view=graph-rest-beta&tabs=cs
How is it possible to switch to another worksheet while the results or computations of the current worksheet are being fetched?
Currently we have to wait for the current computation to complete before moving to another sheet. Ideally I would like to know how can I push the current worksheet job in the background and resume working on another worksheet in Tableau?
Note: Extracts not an option nor multiple instances as the source data has millions of records.
I don't think this is functionality Tableau offers right now, but here are a few things that might speed up development:
If possible, extract your data, rather than using a live connection. I know this isn't always an option, but it can remove a lot of overhead, particularly during development.
Optimize your extracts. Not having to recompute all of your calculated fields every time you make a query can make for some pretty notable speed boosts.
By far the best way to minimize your load times is to subset your data while you're building the worksheets. During development, it might not be necessary to load every row of your dataset. In more cases than not, a subset will be enough to confirm that your worksheets and calculations are working as you need them to. You could try filtering to just a month's worth of data, for example, or maybe just a handful of individuals/stores/dog breeds/Skrillex songs.
Nadir's suggestion to pause auto-updates is a great one, but if you're building more complicated views or more intricate calculations, not having real-time feedback on your work can make development a lot more challenging. However, if subsetting your data isn't an option, this might be your best route. One way to speed this process up a bit would be to toss all of the sheets you want to load onto a dashboard and resume auto updates from there. Note that this dashboard would not be a formatted production dashboard — it's simply serving as a drop point for the sheets you'd like to load all at once.
I've never found a way to achieve this. But it is worth noting that you can have multiple Tableau workbooks open at the same time and they run in separate threads.
So, if you can split your work across workbooks, then you can switch from one to the other during calculations quite easily without the calculation impeding your work. You may be able to merge workbooks later if you organise the split of your work the right way.
If you are using a Live Data Source, you can pause auto-updates, until you are ready to see the results/computations. I know this does not completely help with what you are trying to do but it does give you a chance to go through and create the worksheets you need and then have it all load at once.
We have a SharePoint 2007 deployment which will have a substantially large document library. My client wants the ability to export this library to an Excel spreadsheet, but specifically wants the ability to divide the spreadsheet into several worksheets based on a specific field. Is this possible to accomplish in WSS 3.0, through the object model or otherwise?
There is a out-of-the-box Export to Spreadsheet, but it does not appear to support automated subdivision of the list items into separate worksheets. I do not know if Excel Services that come with MOSS are capable of it, but we do not have MOSS so we cannot consider it an option for now.
EDIT
It seems that by mentioning "out-of-the-box", I am implying that I'd prefer something quick and simple. Let's dispel that. I do a lot of heavy work in the object model. I only mentioned the Export to Spreadsheet because that's the only available method I know of off-hand, and its options are limitted. So I am comfortable with all manner of work level that can be suggested.
I should also note that keeping the list linked with the spreadsheet is undesired. We want to be able to download the spreadsheet as a reference. Because of the number of people who will be working on the list, it would be absolute chaos to try and synchronize all of the linked files. My client has agreed that it'll be easier to handle obsolete copies than to try some synchronized system.
The solution also needs to be deployable. So things which do not tailor to an individual site are best.
You won't be able to do this OOTB. You will have to write some code to iterate through the records of the list either using
The SharePoint OM - Better performance and richer API but has to run on a Web Front End
The web service - Can run on any machine
Then you can build up the Excel spreadsheet either by
Using the Excel object model (aka Automation) if this is a quick kludge running from a workstation - but excel wasn't designed to be used from an unattended server and/or high volume so you may also want to look at
A 3rd party component such as SpreadsheetGear to generate the Excel spreadsheet files.
A good bet is to quickly create views for your items (using filters as you want) mirroring your desired worksheets and then export those views into excel. Those views update with the list and you can manually grab new versions later. Still manual but OOTB and no excel hacking needed.
I posted this on SharePoint Overflow. One of the answers I received there was very useful, regarding the utility of the Open XML SDK. Thank you to those who answered... I looked over your suggestions. My client has decided to go through with this one on account that it does not cost money to implement (as Spreadsheet Gear or datapresentation's plugin would).