BLE dongle API interfacing in Excel VBA - vba

My aim is to create an excel VBA utility which interfaces with the BLE dongle connected to a USB Comport.
I am using BLED112 dongle which uses the BGAPI.
I have been able to successfully implement the sample C example at BLED112 Example on my setup.
I need to interface the BLED112 Example with my Excel VBA such that data from BLED112 Example can be sent to Excel VBA, and vice-versa. For example, list of nearby Bluetooth devices can be seen in column in Excel etc.
I tried to create a dll from the BLED112 Example and add it to my Excel VBA code. However, i was unable to call any functions in the dll from my Excel VBA code.
My questions are:
How can I access the BLED112 Example code from my Excel VBA project?
The BLED112 Example prints data into the console. How can i get the data into Excel VBA?
Thanks a lot in advance!

Related

Re-ask: Get all the VBA macros of a workbook by JavaScript API for Excel

I would like to re-ask a question I asked more than 2 years ago: Can JavaScript API for Office get VBA macros that a document contains? (UserVoice)
Both VBA and VSTO have access to VBA macros. Tools such as XlsxWriter could extrait vbaProject.bin; Moreover, tools like olevba.py could decompress even vbaProject.bin.
If an Office document contains VBA code, it is probably an important component. Some big companies have in-house tools to inspect their VBA macros against bad programming practices, code smells, malware, computer forensics. There are software to measure metrics of VBA macros and find bugs. All these functionalities would be impossible without access to VBA macros.
I guess providing an JavaScript API to read VBA macros would not be too complicated, but it could make possible many features and JavaScript add-ins.
No this is not possible to do today. Web add-ins are a multiplatform concept meaning all APIs exposed in JavaScript most function across all platforms (namely Windows, Online, Mac, iOS). Given that macros are not a multiplatform concept they are not exposed in our JS API.

How to manipulate smart art using vba in excel 2007?

I am trying to create smartart org charts using excel 2007 vba.
I tried to first record the macro to see what objects are involved but with no luck. Nothing was recorded. There are some examples online of smart art and vba in excel 2010 but nothing for excel 2007. Does it mean that smart art is not accessible using vba in excel 2007? Is there maybe some workaround?
It is possible, but is not a simple task.
Read more on
http://msdn.microsoft.com/en-us/library/office/gg583880(v=office.14).aspx
You need manipulate a XML part of file to create new options of SmartArts.
For me, very big work to very small results...

Fragility of using Excel Object Library in Visual Basic

A bit of preface: this project, while technically homework, is completely under my 5-man team's control. We came up with the project, defined the scope, and exercise full creative control. So it's not traditional homework, it's equivalent to a senior project.
One of the outputs of the system I'm developing should be very similar to a well formatted Excel spreadsheet. We could create (or find) a graphics library and handle the printing in our own code... but ultimately we feel that an Excel spreadsheet file will be more portable. As the user can open it up in Excel, edit it, e-mail it, etc.
Accessing Excel programatically seems simple enough (i.e: http://support.microsoft.com/kb/302094)
But my question is: what happens when "Office 2013" comes out, and the user removes Office 2010 and installs 2013?
I won't be around to maintain this project... and I'd hate to force someone into opening up my code just to reference the Excel 13.0 COM.
I'll be using incredibly basic functions of the API.
So long as I can read-and-write to a range of cells, and adjust the interior color of cells, my code will work.
In general, how can I make my VB.Net code access whatever Microsoft Excel API is available on the target system? (Including future Excel APIs.)
I recommend first developing using the Excel PIA (Primary Interop Assemblies) so you get autocomplete and online help in Visual Studio.
Once your program is complete, I recommend switching to late-binding before publishing, so your EXE works with different versions of Excel.
Develop first using the current Excel PIA until it works as you
want (Google "Excel PIA" to download the assemblies)
When your program is complete, add Option Strict Off to the top of the modules that use Excel objects
Replace all Excel PIA classes with Object e.g.Dim xls As Excel.Application becomesDim xls As Object
Replace xls = New Excel.Applicationwith xls = CreateObject("Excel.Application")
Remove the Excel PIA reference and tidy up

extracting cell values in open office calc to set variables in VB.net

Im intrested in finding out how i can add and extract cell values in open office calc using VB.net
dose anybody know any good refrences online to help me get started
The first think you need is the OpenOffice SDK. Here is that link: http://download.openoffice.org/other.html#tested-sdk
Now, most of the examples are written in JAVA and C++. However, there are several sites out there that have utilities or example code for porting to VB.NET. However, you should really learn about UNO with Open Office through this link here: http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide.
Use the guide in tandem with any control or interface you use so that you have a clear understanding of what you are attempting to do. Here is an thread from another site that shows some example code: http://user.services.openoffice.org/en/forum/viewtopic.php?f=25&t=15504

Migrating from VBA Excel 2003

I have a series of big excel files that work like a program, but I hate beeing tied up (stuck in VBA for excel 2003), so...
Whats the best way to implement a gui over a excel vba program (office 2003)? (are there any tools for that... I want to move away from the office suite, but still have it in the background)
Or what's the easiest alternative for migrating this code to a more open language.
Any ideias?
Have you looked at VSTO?
Resolver One is a Python spreadsheet system with strong support for importing from MS Excel. It's often used for the situation you describe.