Skip to content

Instantly share code, notes, and snippets.

View jimmoores's full-sized avatar

Jim Moores jimmoores

View GitHub Profile
@jimmoores
jimmoores / gist:f0b9c59a6f691fb44e449df4d58be212
Created June 26, 2017 11:52
Excel DNA error when entering formulas
[8016] ExcelDna.IntelliSense Warning: 4 :
[8016] PopupList - Could not update selected item: System.Runtime.InteropServices.COMException (0x80131505): Operation timed out. (Exception from HRESULT: 0x80131505)
[8016] at UIAutomationClient.IUIAutomationElement.GetCurrentPropertyValueEx(Int32 propertyId, Int32 ignoreDefaultValue)
[8016] at System.Windows.Automation.AutomationElement.GetCurrentPropertyValue(AutomationProperty property, Boolean ignoreDefaultValue)
[8016] at System.Windows.Automation.AutomationElement.GetCurrentPropertyValue(AutomationProperty property)
[8016] at ExcelDna.IntelliSense.PopupListWatcher.UpdateSelectedItem(AutomationElement newSelectedItem)
@jimmoores
jimmoores / TimeSeriesUtil.java
Created February 16, 2012 17:00
Time Series Update Example
public void updateTimeSeries(String description, ExternalIdBundle externalIdBundle, LocalDateDoubleTimeSeries timeSeries) {
HistoricalTimeSeriesInfoSearchRequest htsSearchReq = new HistoricalTimeSeriesInfoSearchRequest();
ExternalIdSearch idSearch = new ExternalIdSearch(externalIdBundle);
htsSearchReq.setExternalIdSearch(idSearch);
htsSearchReq.setDataField(PRICE_FIELD);
HistoricalTimeSeriesInfoSearchResult searchResult = _htsMaster.search(htsSearchReq);
if (searchResult.getDocuments().size() > 0) {
HistoricalTimeSeriesInfoDocument doc = searchResult.getFirstDocument();
ManageableHistoricalTimeSeries manageableHistoricalTimeSeries = _htsMaster.getTimeSeries(doc.getUniqueId());