Author Topic: writing data to a excel template  (Read 1453 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
writing data to a excel template
« on: June 02, 2018, 11:35:05 AM »
Hi AHMI community.  I am looking for some basic help writing data to an excel file.  I have created an excel that I want to use as a template.  My app has a listview control that I populate with data.  I need to get this data to the excel file.  I believe I need to use a reference to Microsoft excel some how but not sure how to get started, google has some info but a little over my head.  Any help is appreciated, thanks. 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: writing data to a excel template
« Reply #1 on: June 02, 2018, 12:32:29 PM »
If you want to write the data only to the file, but not view the live data in Excel, then you can use EPPlus.

In Visual Studio, go to Project->Manage NuGet Packages
Search for and Install EPPlus

If you search EPPlus on this forum, there are a few examples. You can also find some example projects here:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/SampleProjects/


If you don't find a good enough example to fit what you want to do, let me now and I will put something together.