excel-dna / samples Goto Github PK
View Code? Open in Web Editor NEWVarious sample projects and snippets related to Excel-DNA
License: MIT License
Various sample projects and snippets related to Excel-DNA
License: MIT License
This comment on StackOverflow suggests that it doesn't: https://stackoverflow.com/questions/29279908/how-to-get-exceldna-work-with-r-net/29289258?noredirect=1#comment123852454_29289258
As an Excel-DNA Newbie, I carefully went through the notes and examples given on the official site before attempting 3 of your examples for various ways to implement RTD functions (I did not look at RtdClock-IExcelObservable). After using Nuget to install Excel-DNA version 0.34.6 (targetframewok=net461), everything compiled and worked but I had an issue with the speed of updates in all 3 cases – the clock only updated every 2 seconds. Given the simplicity of the projects, this suggests something is wrong.
Focusing on RtdClock-ExcelRtdServer, I tested it on Excel 2016 MSO 32-bit and on an older version of Excel, 2007 SP3, both on my PC. Further, I tried it on a colleague’s PC, again Excel 2016 MSO 32-bit. Each time the results were the same.
As I have not had update problems with third party RTD services in the past (e.g. Bloomberg), I am loath to start stripping down my Excel before asking you a couple of questions.
Firstly, can you confirm that you do not get these update issues when you run RtdClock-ExcelRtdServer within the same Excel environments?
Finally, I note that you choose not to override the Heartbeat() method. This means I cannot see it and analyse it. Can you explain what the default method is as it might help to provide some insight to help resolve my issues?
I have a large number of tests working on NUnit.
Is is possible to use NUnit with Excel-DNA Testing Helper ?
I do see an example using XUnit only.
Dear Govert
I am getting the run-time error '429': ActiveX component can't create object' with C# my solution which uses DNA to speak to Excel. I get this message in VBA when it tries to instantiate the .NET class. It all used to work fine till a few days ago. When looking for possible causes, I came across this solution of yours, which I tried. I still get the same error message. I guess it just shows that something has gone wrong on my machine, independent of the solution.
Would appreciate any help.
Thanks
Raj
I downloaded the AddInReloader sample, and updated the paths in the xml file to my AddInReloader.dll and AddInReloader-Addin.xll paths.
The Addin unloads correctly, however when the AppDomainSetup is being created I get the following error:
A problem occurred while the add-in was creating an isolated
application domain and loading required assemblies.
ApplicationBase could not be set.
This is an unexpected error. Please report this error to the add-in developer.
Additional error information: HRESULT 0x0D642078
This add-in is built with Excel-DNA and is being loaded from the following location:
C:\my\addin\path\AddInReloader-AddIn.xll
Any idea why this could be happening?
-robodude666
Motivated by a recent Stackoverflow discussion, I thought this would be a nice sample function to discuss the async / IObservable features.
I am trying the DnaComServer exactly as scripted but I am not able to reference the dll in the last step for Late Binding - it does not appear in the list.
I have modified the paths in the Post-Build script to reference 1.6.0 rather than 1.5.1
I could not, though, find the bat file referenced in this script line
call "$(DevEnvDir)....\VC\Auxiliary\Build\vcvarsall.bat" x86
and I could not find the ExcelDnaPack.exe file in the project folder
"$(ProjectDir)\packages\ExcelDna.AddIn.1.6.0\tools\ExcelDnaPack.exe" "$(ProjectDir)$(OutDir)$(TargetName)-AddIn.dna" /Y /O "$(ProjectDir)$(OutDir)$(TargetName)-AddIn-packed.xll"
Are the missing files critical to the post-build script? And if so, where do I find them?
I am running Visual Studio Community 2019 on a Windows 10 computer
I am a newbie at VS and Github
The Late Bind example code works fine
Thanks in advance
Your Logging example works fine for me out of the box, but when I use NuGet to get the latest version of Excel DNA (0.34.6) and use the command 'Update-Package -reinstall', all logs go through the Diagnostic Display regardless of what I do.
The build event code ends up being replaced with:
<PostBuildEvent> </PostBuildEvent> </PropertyGroup> <Import Project="packages\ExcelDna.AddIn.0.34.6\tools\ExcelDna.AddIn.targets" Condition="Exists('packages\ExcelDna.AddIn.0.34.6\tools\ExcelDna.AddIn.targets')" /> <Target Name="EnsureExcelDnaTargetsImported" BeforeTargets="BeforeBuild" Condition="'$(ExcelDnaTargetsImported)' == ''"> <Error Condition="!Exists('packages\ExcelDna.AddIn.0.34.6\tools\ExcelDna.AddIn.targets') And ('$(RunExcelDnaBuild)' != '' And $(RunExcelDnaBuild))" Text="You are trying to build with ExcelDna, but the NuGet targets file that ExcelDna depends on is not available on this computer. This is probably because the ExcelDna package has not been committed to source control, or NuGet Package Restore is not enabled. Please enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" /> <Error Condition="Exists('packages\ExcelDna.AddIn.0.34.6\tools\ExcelDna.AddIn.targets') And ('$(RunExcelDnaBuild)' != '' And $(RunExcelDnaBuild))" Text="ExcelDna cannot be run because NuGet packages were restored prior to the build running, and the targets file was unavailable when the build started. Please build the project again to include these packages in the build. You may also need to make sure that your build server does not delete packages prior to each build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" /> </Target> <PropertyGroup> <PreBuildEvent> </PreBuildEvent>
See:
Samples/Logging/Logging.csproj
Line 74 in f5a9e7a
Hello,
I tried to open RtdClockVB-ExcelRtdServer.sln in VS 2019, but VS tells me that "the project is not supported":
In English it would be, more or less, "Cannot find application on which this project is based"
Is this possible?
See this discussion: https://groups.google.com/g/exceldna/c/34BpWR6iNqw
Tried on Excel 2016 x64 Version 1803 (Build 9126.2152 Click-to-Run).
Tried to update ExcelDna NuGet packages to v0.34.6.
If I don't click My Button and just close Excel right away - it doesn't crash.
In AsyncHelloWorld, there is one line code like
ExcelAsyncUtil.Run("RunSomethingDelay", new [] { name }, () => RunSomethingDelay(name));
And I replace the 1st and 2nd arguments into this, and nothing changed.
ExcelAsyncUtil.Run("aaa", null, () => RunSomethingDelay(name));
So, what are the 1st and 2nd arguments in ExcelAsyncUtil.Run for?
With the latest version of ExcelDna 1.7-rc5 (or even earlier) it is possible to pack native dependencies in a .dna file, but I could not figure out a way to use them in .NET Framework 4.8.
I am using SQLitePCLRaw and e_sqlite3.dll
native library. My understanding is that it uses DllImport
or similar mechanism to make calls to the native library. The problem is that even though the library is packed and shipped in .dna file, the process still fails with System.DllNotFoundException: Unable to load DLL 'e_sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
. I verified the content of .dna file and see the library there, so it's not related to the packing process.
Does ExcelDna unpack native libraries to a folder when it loads? I know it loads all managed libraries from memory (opposed to file system), but do not know how native libraries are supposed to be handled/loaded. I could not find any examples in Samples repo as well.
Any help is greatly appreciated.
Hi,
I tried using the sample logging functionality in the Samples-master but unfortunately no log is created however the solution was built successfully. I did read through the readme and documentation / code and also tried to play with the code but did not have any luck.
Can you kindly give me a hand please?
Regards,
Ken
The Registration samples should use the NuGet package and work on their own, without the Registration project source code installed.
We might also remove the .dna files and add the <ExcelAddInExplicitRegistration>true</ExcelAddInExplicitRegistration>
properties in the project files.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.