Excel in visual studio

HI I want to view my excel workbook in visual studio 
The visual studio application will be sitting on a clients computer i want the excel workbooks to be sitting on my computer i don't want them to be able to save or copy the workbooks.
i think i need code to look up my IP address ???
Can anyone help

Hi,
Can you be more exact?Does IP address have anything to do with your visual studi application?
FREE
C# Word  component is being evaluated, any recommendation is appreciated.
Life is made up of little things.~)

Similar Messages

  • Can't Create New Excel Project Visual Studio 2013 Office Tools The Project Cannot Be Created

    I am having this issue on two computers. If I try to create an Excel 2013 Workbook C# in new projects, and choose create a new workbook, it starts to open Excel, and then I get this error in VS
    I have tried:
    Uninstall & Reinstall of VSTO from the Visual Studio Installer
    Uninstall & Reinstall of Visual Studio 2013 Ultimate, (manually removing anything with visual studio that was left over)
    Manually turning on the add-on Visual Studio Tools for Office Design-Time Adapter for Excel
    Installing VSTO by hand
    Enabling Macros
    Running VS as administrator
    Uninstalling & Reinstalling Office 2013 Pro Plus OLP
    I have made this change to excel:
    Like I said, this problem occurs on TWO pc's.  I have tried 2013 Visual Studio R1 and R2.  Does anyone have any ideas?
    Edit 3-1-2015
    There is still no answer to this, I have tried target frameworks:
    4.0
    4.5
    4.51
    And Running as Administrator.  Recently I upgraded to the CTP of Visual Studio 2015 Ultimate and the same problem exists.

    Thanks for the reply.
    The issue is not reproducible for me and I can confirm this not a known issue. We might need to do deeper troubleshooting at the repro machines.
    Because of its complexity your question falls into the paid support category which requires a more in-depth level of support.  If the support engineer determines that the issue is the result
    of a bug the service request will be a no-charge case and you won't be charged. Please visit the below link to see the various paid support options that are available to better meet your needs.
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Sangeeth,MSFT

  • Adding excel workbooks with visual studio

    Im using visual studio 2013 visual basic to read and create files, but Im having trouble importing the correct reference so I can create and write to Excel workbooks and worksheets, the visual studio help tell me to go to project, add reference and select
    Microsoft.Office.Interop.Excel, but it does not show on my list, what can I do, can anyone help, Thanks

    Please view this link.
    https://siddharthrout.wordpress.com/vb-net-and-excel/
    Scroll down the page just a bit and you'll find your answer.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Visual Studio Community Edition - Error on creating ribbon for Excel Workbook project

    Hi. I've been struggling with this for a couple of days now so I hope someone can help me.
    I have installed Visual Studio 2013 Community Edition. On installation there was no option to include VSTO and, looking on various forums, I found it was necessary to install the VSTO - November 2014 update separately, which I have done. I'm working on a
    brand new virtual server (Windows Server 2008 R2 SP1) and no other versions of Visual Studio have been installed (although I'm surprised to see Visual Studio 2012 as an item in All Programs - but it just contains command prompts).
    I have created an Excel Workbook project. When I go to create a new item - Ribbon (Designer) - I get the error:
    Could not load file or assembly 'Microsoft.Office.Tools.Common.Implementation, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    I've searched the Internet for anyone who might have had this same issue but have been unable to find anything to help me. I've tried uninstalling the VSTO-November Update and VS 2013 CE and reinstalling both but still the same problem.
    Any help would be much appreciated!
    David.

    Hello David,
    What Office version do you have installed on the problematic machine?
    Do you run Visual Studio as an administrator?

  • Visual studio online - Excel power query usage and samples needed

    Background
    Visual Studio Online does not offer much in the way of reporting, when compared to (onsite) TFS... unless you utilize the REST API functionality.
    The Visual Studio Online REST API is fairly extensive, but not very 'reporting' friendly to applications like Microsoft Excel.
    Question
    Are there any good examples of Microsoft Excel Power Query usage - to acquire and create reports via the Visual Studio Online REST API?  I've searched - but surprisingly haven't found anything of substance.  It is fairly simple to call a VSO REST
    query using Excel Power Query, but not so simple to iterate through the lists within lists, etc... unless you are familiar with 'M language'.

    Hi,
    Thank you for reaching out to us. I am currently researching to gather more information with regards to your request. I shall revert back to you with an update at the earliest. Sincerely appreciate your patience.
    Regards,
    Nithin Rathnakar

  • Visual Studio report with tabs (Worksheets in Excel) broken up by a specific field?

    I am fairly experience with SQL, but am somewhat new to using Microsoft Visual Studio. However, it is very similar to other SQL programs I have used a lot before. I have Visual Studio 2008.
    For my company, I use Visual Studio in creating BIDS reports that are then uploaded to our Learning Management System (LMS). You can then run the reports within our LMS, and also export them to Excel.
    What I am trying to figure out is if you can set the report to create separate tabs (worksheets), broken up at a certain field, when exported to Excel.
    For example, say I have a report that displays all people and the trainings they have overdue. Say I want it to create a separate tab for every department. For example, one tab would say "Finance" and would be all the Finance people and the trainings
    they have overdue. One tab would say "HR" and would be all the HR people and the trainings they have overdue.
    The main report is already created, but currently just lists all data, sorted by department. It does have parameters so you can narrow it down to just a certain course or set of courses, just a certain department, etc. Does anybody know if this is possible?

    I apologize for not replying sooner. Thank you so much for your help. It looks like this will solve my problem. Unfortunately, I have not yet been able to re-visit this, as I have lately been pulled into a number of high priority tasks, causing the
    need for this to be pushed back. I will re-visit this again when I have a moment and give this a try. Thank you.

  • Move a Excel 2010 Dokument Addin Project (Visual Studio 2012) to another devleopment machine with Visual Studio 2012 , but Office 2013

    Hi 
    we do have the following situation
    on computer A there is a Excel Document Addin development project , Visual Studio 2012, Office 2010 installed. All works fine.
    we would like to bring the project to another machine with Visual Studio 2012, but Office 2013 installed.
    Visual Studio can not build the project. It says that the application is not installed on the machine (though Excel 2013 is installed , but not Excel 2010) It seems to have a problem with the
    vbproj. 
    In other forums I found a hint that "Hostpackage = ..} needs to be set accordingly in the vbproj. I created then a "empty Excel-Addin project" under Visual Studio , looked at
    the Hostpackage entry, put that into the vbproj of "problem project. It still does not work.
    It would be great if anyone could help.
    Thomas

    Hello Eugene
    Problem is that it says that projectboard (the name of the main project) can not be loaded. All other projects in the solution can be loaded. Strange thing is , now that I try to create a empty excel Project it says that according to Excel security settings
    it can not be generated !? 
    I opened then Excel and set all Trust Center settings to "Default" - but no effect. I really have no idea what is wrong ..!? 
    Tom

  • Excel Importer for Visual Studio LightSwitch 2013

    Has anyone managed to get the 'Excel Importer for Visual Studio LightSwitch' extension working with Visual Studio 2013?

    Hi Kevin,
    I assume you mean this extension here -
    http://code.msdn.microsoft.com/silverlight/Excel-Importer-for-Visual-61dd4a90
    From what I can tell that does not yet support VS 2013.  The source code is of course available, so you could attempt to fix it up yourself and tell us the result.
    Thanks.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Excel interop. error with Visual Studio 2012

    I am using a stand alone and not a server loaded with VS and office 10, I have done all the interop and importing name space and from my experience that should not be a problem.
    Just help, how is this finally resolved, have you done an article on it?
    Retrieving the COM class factory for component with CLSID {00024500-000-000-C00000000046}
    failed due to the following error:
    80004023 A Microsoft software installer error was encountered.(exception from HRESULT:0x80004023)
    Please help

    Hi,
    >>The reason this is the right forum is that we are talking about preserving COM and hooking up these libraries
    into the managed environment using Interoperation. 
    I will clarify the topic of this forum. This forum is discussion questions about visual studio extension such as the VSPackage, Add-in and so on. And according to your second reply
    "By the way am getting this error while sending data from VS 2012 to Excel"
    and your original post, that forum is the correct one. General Office Development forum is for office
    developer or related with office development. Your problem is related with excel, in other word, Microsoft office.
    And the
    General
    Office Development forum is for general Office Developer discussions and questions that are either non-application specific
    and/or are not specific to one of the product specific forums in this category. 
    I have consulted the engineer there to ensure it is a case there.
    Please feel free to let me know if I misunderstand you.
    Thank you for your understanding!
    Best regards,
    Sunny

  • How to open and read Excel Sheet from SharePoint 2013 Document Library using C# Visual Studio 2012

    Hi,
    To achieve these are the steps that I had followed :
    1. Add the document Library path into Central Admin -> Application Mgmt -> Manage Service App -> Excel Service App -> Trusted File Locations
    2. Add Documnet Library link to Trusted Connection Proivder
    3. Open Visual Studio as Run as Administrator
    4.Create an SharePoint 2013 Empty Project.
    5.Add Service Reference : http:\\<server>\_vti_bin/excelservice.asmx
    6.Service added successfully
    7.Create a class file and add the Service Reference namespace
    There is no such class as ExcelService to call. 
    Please let me know if somebody knows how to open the Excel file into C#(2012)  either using ExcelService or any other way to open. I tried old methods of Sharepoint 2010 server but it's not able to access classes.
    Requirement is :
    Need to read the excel sheet  from Document Library and transfer all data into DataTable.
    Please help asap. 

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, I'll move your question to the SharePoint 2013 development forum
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/home?forum=sharepointdevelopment
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • Getting "Couldnot find Installable ISAM" error in script task in SSIS 2005 when trying to open (.xlsx files) Excel 2007-2010 files using VB script in Visual Studio 2005

    Hi Experts,
    I am trying to open .xlsx file in script task of SSIS 2005. I am using the 32-bit AccessDatabaseEngine driver with the Connection string as "Provider= Microsoft.ACE.OLEDB.12.0; Data Source=xlsx file path; Extended Properties="Excel 12.0 Xml;
    HDR=YES"" in script task.
    When we debug the VB script in Visual Studio 2005 and encounters the statement app.open() it throws the error "Couldn't find installable ISAM".
    My SQL server version is 2005 SP2 DE
    OS is Windows server 2003 EE SP2
    Could anyone please let me know what is the resolution for this error?
    Thanks and Regards,
    Adesh

    Hi Adesh,
    First, make sure the package runs in 32-bit runtime mode (set Run64BitRuntime property to False) because you are using the 32-bit ACE OLE DB Provider. If it is not the case, the issue may occur due to the corrupted drivers or registry keys. You can try to
    reinstall the 2007 Office System Driver: Data Connectivity Components as Arthur suggested.
    Regards,
    Mike Yin
    TechNet Community Support

  • Microsoft Office Customiziatoin Installer : Error during installation, file:///c:/Program Files (x86)/Microsoft Visual Studio Excel 2013, Windows 7 64 bit

    How do I get ride of the Microsoft Office Customization Installer  Error during installation, Name:  file:///c:/Program Files (x86)/Microsoft Visual Studio     From:  10.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.QualityTools.LoadTestExcelAddIn.vsto
    Downloading file: :///c:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.QualityTools.LoadTestExcelAddIn.vsto did not succeed
    Details: 
    Name: 
    From: file:///c:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.QualityTools.LoadTestExcelAddIn.vsto
    ************** Exception Text **************
    System.Deployment.Application.DeploymentDownloadException: Downloading file:///c:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.QualityTools.LoadTestExcelAddIn.vsto did not succeed. ---> System.Net.WebException:
    Could not find file 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTestExcelAddIn.vsto'. ---> System.Net.WebException: Could not find file 'c:\Program Files (x86)\Microsoft Visual
    Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTestExcelAddIn.vsto'. ---> System.IO.FileNotFoundException: Could not find file 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTestExcelAddIn.vsto'.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath,
    Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
       at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
       at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
       --- End of inner exception stack trace ---
       at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
       at System.Net.FileWebRequest.GetResponseCallback(Object state)
       --- End of inner exception stack trace ---
       at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.Net.FileWebRequest.GetResponse()
       at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
       at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

    I discovered the cause of this problem. I had pointed my "My Documents" folder to a NAS drive that I had rather than my C drive. Apparently Photoshop was dependant on it being on the C dirve. When I  repointed this back to my C drive CS5 installed properly.

  • Using Excel with Visual C++ 6.0 (need a graph control that behaves as much like the one in CVI as possible)

    I hate to beat this to death but I was unable to find a
    clear answer to this question.  Does NI provide Excel control from within
    Visual C++ 6.0? 
    I read that NI supports the ANSI-C library only for Visual C++ 6.0 users:
    Thread : "Re: Benifits of using measurment
    studio for VC++ 6.0?"
    NI REP : drohacek
    Quote  : "we made the decision to support Visual
    C++ 6.0 users only through the ANSI-C interface and not through the Measurement
    Studio MFC-based class libraries."
    If there is a suggested way of controlling Excel from within Measurement Studio
    for Visual C++ 6.0 then I’d love to know it. 
    If not, can a plain statement be made basically stating that if you want
    to control Excel you can’t use a Visual C++ 6.0 environment even with Measurement
    Studio support?
    With .NET of course you can just decide to have Excel support added during
    project creation.  CVI can act as an ActiveX server and easily control
    Excel just by building off the examples shipped with CVI.  I see that
    there is support, using the Measurement Studio for Visual C++ 6.0 Project Wizard,
    for taking existing CVI projects and converting them to Visual C++ 6.0 projects
    or for calling CVI libraries from a .dll from within Visual C++ 6.0.  I suppose I could do the work
    in CVI and then convert the project but I'm so deeply tied into all my MFC calls that I don't see
    how I can cleanly include the CVI libraries into my existing VC++ 6.0 projects.
    What I'm really after here is a visual graph control like the one in CVI that I
    can use from Visual C++ 6.0.  I purchased a 3rd party graph control for use
    in VC++ 6.0 that works well but isn't really visual.  I mean you can't
    enter any values in it until you run the program and fill it out programmatically. 
    Then you can see which columns are two narrow, quit the program, adjust the
    column width of your now empty control, and repeat, until you get the thing
    looking the way you want.  If I could call into Excel from within Visual
    C++ 6.0  the way I do from within .NET
    then I could use Excel to hold the table and just read in the values into my table
    control at run time.  Basically I'd use Excel as a visual development tool
    for all my tables.
    I do all my coding from within CVI and Measurement Studio for Visual C++
    6.0.  I'd use CVI for everything if I didn't depend so heavily on certain
    outside controlled C++ .dll's.  Could you please suggest then what I can
    do to get Excel support for Visual C++ 6.0?
    Last question :
    Is there any plan to ever have a NI table control like the CVI table control for
    use in Visual Studio?  One that you can
    completely set up before you do any compiling? 
    I imagine that the way Microsoft sets up their environment makes this idea impossible.  Otherwise someone would
    have come up with a truly “visual” table control before now.
    Thanks,
    Grant
    Grant M. Johnson
    Project Engineer
    LECO Corporation

    Hello Grant
    You can most certainly use Excel with VC++ 6.0. Measurement Studio won't provided you with any classes to talk to Excel in VC++ 6.0. This is because Excel allows control via Automation and you can use its automation API to do anything you need with Excel. This is what CVI uses as well.
    You can see this MSDN article on how to set this up. This mentions VC.NET, but it should work the same way.
    Here is one that talks about VC 6.0 and Excel.
    Here is a code project article about this.
    Even with .NET, you have to do thru the Excel Automation support. Excel started shipping with Primary Interop Assemblies (PIA) which are .NET wrappers about the Excel Automation object model. C++ Automation is definetely not as nice as .NET, BTW
    See this document for more information about the Excel object model.
    I would not recommend using the CVI Excel libraries if all you want to use them for is Excel automation. You will end up creating un-necessary dependencies and go through extra layers that way. You can make calls straight to Excel from VC++ without requiring CVI.
    One quick observation about your excel approach. If you decide to use Excel as your table, you might be requiring everyone who uses your application to have Excel installed on their machines. Just wanted to make sure this was acceptable to you.
    Have you looked at the Datagrid Activex control, which is one of the common controls that ships with Visual Studio? You can add it to Visual Studio by right-clicking and picking it from the list of installed activex control. If you have not already, you should check it out.
    Microsoft has made significant improvements in the number of controls they provide with .NET. They have a Datagrid control that seems to be what you need.
    Measurement Studio did add some high level classes for Excel and Word Automation that simplify some common tasks, but these exists for VS 2003 C++ and VS 2005 C++, not for VC 6.0. Underneath, we end up using the same Excel automation classes, so you can easily setup something similar for VC 6.0. Plus you can find alot of references online on how to use the Excel Automation object model with C++.
    We currently have no plans in Measurement Studio to create a table control unfortunately. I am assuming when you said graph, you actually meant table, since Measurement Studio already  provides a ActiveX graph controls for VC++ 6.0 that is very similar to the CVI graph.
    On a side note, VC++ 6.0 is really really old. Have you considered upgrading?
    To summarize
    - Yes, you can use Excel with Vc++ 6.0 without mstudio.
    - Try using the Datagrid Activex control if you just need a table.
    - Measurement Studio provides high-level excel and word classes for VC++ 6.0
    - Measurement Studio provides a graph control for VC++ 6.0 which is very similar to the CVI graph.
    - Measuremnt Studio does not have a table control.
    - VC++ 6.0 is really really old. Have you considered upgrading?
    Bilal Durrani
    NI

  • Visual Studio 2013 - New Project

    Hi
    Many years ago I wrote a VB6 program for school students for diet analysis in terms of energy and a range of vitamins and minerals.  It drew comparisons against the national guidelines.  Results were tabulated, graphed and output provided in Word
    and Excel files.  The VB6 program used an Access database containing about 850 foods. It has been used by quite a few schools and appears to always be used across a network.
    My intention is to re-write the whole program in Visual Studio 2013 using Visual Basic code.  I intend to refresh the whole program and add a wider range of foods and update the comparisons using the latest national guidelines and food label formats.
    This will be my first attempt at Visual Studio and I intend to use a Windows Forms Application approach.  The data used is "static" - it does not change it is simply a "read only" file - get the data, multiply for mass and add up each
    category (energy, vitamins and minerals).  It is a "file of data" rather than a true database.  In reality a 1000 food data file should only be about 200 Kbytes.  As an Excel file it is only 150Kbytes but as an Access file it is bloated
    up to a 550Kbyte file.
    The program is not sophisticated, so, should I be using a WPF Application or a Window Forms Application?  The WFA just feels a bit more familiar than a WPF.  Also, the program is intended for loading onto a network at some schools or on a stand-alone
    computer.
    My greatest concern is about the choice of approaching the data.  A "true" database is not needed because the data is simply for about 1000 rows of food each with about 20 columns of data (numeric and text).  The Access file is simple
    but I could create an mdf file (I think) but would that be an advantage?  With the Access data I appear to have loaded the file and created a DataAdapter and I have experimented with GetData() which works.  My attempts to use ExecuteReader() failed
    completely.  Is there a better approach?  such as SQL "DataTable.Rows(RowPosition)(“column name")”??  It seems a very sophisticated method for a small file of data.
    The Access Database that I have experimented with in VS2013 appears to use Jet Drivers???? which proved to create a few problems for installations in the past.  Should I be using an mdf file approach??  I will need to distribute the data in a "resx"
    file.  I could use SQL Server Management Studio (free download) and then use VS2013 to read the Access file and build a new mdf database.....
    I am not convinced that I have the best solution.  Any comments and suggestions would be very greatly appreciated.
    Many thanks for reading this far.
    Winchestermili
    Winchestermili

    Frank
    Looking good!  The "attachment" to a new project worked first time.
    I can see all the new Classes by hovering a pointer over the "declarations" above "Public Class Form1"
    Seems to access the VBNetForum URL quite quickly using a high speed BB connection.
    I am greatly looking forward to the next stage...........
    Regards
    Keith
    Winchestermili
    Keith,
    I intentionally truncated that post with “let me know when you’re that far along” simply because it’s very easy to get lost
    with a concept that’s new. This isn’t as different as you might think though – you’ve been using a database, and now you’ll be using instances of a class (various ones).
    Over the years here, I’ve seen many times where people use databases because they assume “that’s the only way to do it”. The
    “it” actually being encapsulation.
    Encapsulation
    is what they need and certainly a database provides that (and a lot more), but it’s not the only way it can be done.
    Think about this a bit: A DataRow encapsulates the related data for whatever it is. For example maybe it’s a person’s data –
    you’d want to keep the person’s first name, surname, and things like that all together because it defines something related to that one person. You then have a collection of those DataRows in a DataTable.
    In much the same way, what I have here is similar: Instead of a DataRow, I’m using instances of a class. Instead of columns
    in a DataRow, I’m using properties of the instance, and instead of a DataTable, I’m using a List(Of Class).
    …the concept is identical.
    Classes are a means of building an object in OOP. In and of itself, it’s really just a template or a blueprint (overused metaphor).
    Deborah Kurata put it best, in my opinion, when she said that a class is like a cookie-cutter and the objects created are cookies. You eat the cookies, not the cookie-cutter!
    A class works that way exactly: You can’t “consume” a class; you consume the objects (instances) created by them and in this
    case, like a DataTable housing DataRows, I’m storing them in a very specific type of collection known as a List(Of T).
    I don’t want to get too far adrift about classes and/or OOP here – not that I would mind the discussion – but it’s a new concept
    to you and it’s easy to get confused about what’s doing what. I’ll get more to the specifics next.
    That entire class library is the data layer; it doesn’t work with controls of any sort, only the data.
    That said though, in the following I’ll explain how controls can be ‘assisted’ by the methods in the classes.
    The main class in this is the one called “FoodComposition”. That one is only barely started – the
    only
    method in it so far is an overloaded way to add a new instance to a list of them.
    Two of the classes are really just ‘supporting classes’ – those being the ones called “FoodCategory” and “LabelNote”. Don’t
    get me wrong here, they do have methods in them (with more to be added), but you won’t too much be working with those in the user’s program – you will in the program that I’ll create for you to add/modify/remove* and so on, but for now let’s set those two
    aside.
    *  The fact that these are “supporting” classes, I have it set up such that you cannot remove an instance of those if there’s
    a reference to them in FoodComposition. If you want to see where/how I’m doing that, look at the code of the class FoodCategory, for example, and go to line 633, then read the code of that method named “Remove”.
    The one class in the bunch which is pretty much self-contained is the one called DietaryReferenceValue (DRV is the name you
    used). That one makes for a good topic to explain how I can provide methods which lend a helping hand to your controls but don’t, directly, have anything to do with controls.
    I have a method in that class named “GetAllGroupNames” which is a function that returns a string array containing the names
    of each instance’s group. That might be used, for example, if you wanted to show a ListBox or a ComboBox to allow the user to select one of the group names:
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    Dim url As String = _
    "http://www.fls-online.com/VBNet_Forum/12-13-14/NutritionData.xml"
    GetNutritonData(url)
    ListBox1.Items.AddRange(NutritionData.DietaryReferenceValue.GetAllGroupNames(drvList))
    End Sub
    So, for example, when the user selects one of them:
    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles ListBox1.SelectedIndexChanged
    Try
    If ListBox1.SelectedIndex > -1 Then
    Dim selectedGroup As String = _
    ListBox1.Items(ListBox1.SelectedIndex).ToString
    Dim drv As NutritionData.DietaryReferenceValue = _
    NutritionData.DietaryReferenceValue.GetInstance(drvList, selectedGroup)
    MessageBox.Show(drv.ToString, drv.SexAndAgeGroup)
    End If
    Catch ex As Exception
    MessageBox.Show("An error occurred:" & vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    As you can see there, I’m using the .ToString method which I have overridden in the class. That’s also part of what I wanted
    to discuss: What it gets.
    Currently I don’t have much else (other than maintenance routines like adding, removing, renaming) in there; the methods that
    you use are methods that I set up – but in the words of Hamlet, “therein lies the rub” … I don’t know what you want!
    Give some thought to just what methods you might want to have in there. For example maybe you might want to have a method which
    will return the value of one specific nutrient which you specify. I can do that, I just don’t know yet that you want it so it’s not there.
    Quite often I’ll also provide what I’m come to call “convenience properties”. For example with the property named “Sodium”,
    I might have another property (read-only) named “Sodium_String” which returns a string in whatever format you wanted it to have.
    These are things I don’t know that you want and also things which you may not have known can be done, thus this writing. ;-)
    The other day I asked about units. It may not be where you want to go with this but I’d also like to offer that we can provide
    more granularity to the nutrients themselves. Don’t get me wrong, it’d be an overhaul of what I have right now, but I’ll do it if you want to proceed:
    Imagine that we have a class, all by itself, that we call “Nutrients”. At the very least that class would have members like
    Name and UnitOfMeasure, but it could have anything else you wanted. An example that comes to mind might be the URL to a page on Wikipedia about it, or maybe a URL to an appropriate image or … whatever you dream of here.
    So then when using them in the other classes, “Calcium” would, itself, be an object which has a name (“Calcium”), a unit-of-measure
    (maybe “milligram”), and so on.
    It’s a lot to take in all at once and even this is something you may want to reread, but do give it thought. Let me know what
    methods you want in the classes which will help you in your user’s program.
    Still lost in code, just at a little higher level.

  • Visual Studio or LabWindows/CVI?

    I have a bit of a dilemma.
    I currently own Visual Studio 2010, IMAQ Vision Development Module 2013, and Measurement Studio (not sure of version). I currently do all of my programming in VB.net. Because IMAQ VDM is stuck in .Net framework 3.5 and there will be no further .net development by NI, I need to plan for the future. My applications need run on Win 8, 9, 43, or whatever my company decides to migrate to from Win 7.
    My understanding is that the NI modules I currently own will work with LabWindows/CVI. Correct? I also believe I can use them with C++ using the VS IDE. Is this also correct?
    Within my applications I do a lot of interfacing with Excel, writing text files, and interfacing to non-NI devices (cameras, DAQs, scanners, etc). I am able to do these things pretty easily using VB.net using vendor-provided SDK's.
    Therefore, my question is this...given the investment I have in software already, do I gain anything by migrating to LabWindows/CVI? What do I lose?
    I should point out that regardless of the path I choose I will need to bone up on my programming skills in the corresponding language.
    Thanks for all your help!

    Hello Steverino!
    Here are some advantages when using LabWindows/CVI over Visual Studio, which make the product more suitable for various industry-related applications:
    You are correct, LabWindows/CVI integrates with the NI platform: NI hardware and software, like TestStand or LabVIEW (e.g. debugging source code from one software to another, seamlessly).
    NI hardware and third-party hardware connectivity.
    OpenMP support.
    CVI integrates with intrument control.
    CVI Run-Time benefits from User Protection.
    Run-Time checking (e.g. for uninitialized variables).
    Scientific User Interface Controls and GUI Editor.
    Advanced debugging capabilities:
    Remote debugging support from ADE.
    Real-Time debugging support from ADE.
    Memory leak detection using the LabWindows/CVI Resource Tracking Window.
    Just-In-Time debugging.
    Deployment: build custom installers and patches that you can ship as stand-alone easy-to-use installers.
    LabWindows/CVI libraries: Advanced Analysis, Toolbox, Connectivity (Network Variables, Network Streams, DataSocket), etc.
    Support for LabWindows/CVI Toolkits: SQL Toolkit, Vision, PID, RT.
    Regards,
    - Johannes.

Maybe you are looking for

  • A suggestion for next 5800XM firmware update

    I hear all the time people wants widgets on their homescreen. i'm not sure if this the waht i really miss there. instead i will be much more happy if i could have the contact bar above (and more than 4 contacts, at least 6-7 which we could roll left/

  • 3rd Party Apps won't uninstall or display correctly in App Manager

    I've found that my Razr, like most devices, needs housecleaned every so often to perform at peak. I regularly (monthly-ish, or whenever the device seems bogged-down) clear the cache partition, and houseclean the App caches.  Some of them get very cum

  • Incorrect detection of double-clicks in layers and channels windows. (Mac OS X 10.6.8)

    Photoshop will detect a double-click in the layers and channels panels even when there are different modifier keys held down on the first click vs. the second click. I have never intended to double-click and accidentally changed the modifiers I was h

  • Message Mapping vs Interface Mapping test tabs giving different results.

    Hi all, I am developing an interface that always requires an output file to be created (even if there is no data).  I have found a way to change my select statement in the JDBC sender to initiate the message even if there isn't any data (using UNION

  • How to control flow of messages to target

    I am using a Multi mapping in the Message mapping. The structure of Target message is as follows. Messages1 +Node1 +Node2 ( duplicate sub tree of Node1) +Node3 ( duplicate sub tree of Node1) +Node4 ( duplicate sub tree of Node1) Messages2 +structureN