Code to fetch data from excel in WPF window - wpfdatagrid

hi
I want to develop C#.NET base WPF application ,in which I want to fetch data from excel file included in same project as well as manipulate through this data in WPF window.

The easiest way is probably to convert the excel file to csv from within excel itself and use for example http://www.codeproject.com/KB/linq/LINQtoCSV.aspx. Then get the WPF toolkit http://wpf.codeplex.com/ and use its DataGrid with AutoGenerateColumns="True" and set the ItemsSource with the output from LINQtoCSV.
If you don't want to convert to CSV you'll have to use something like Open XML SDK 2.0 or http://www.smartxls.com/.

Related

How do you pass data into word VBA through a web application?

My goal is to create a web application that populates a word document to download or save.
Here is the website that I am working on:
https://cullerwhale.github.io/tinypets/1single.html
Here is an example of the website and the existing output:
Here is an example of the desired output:
I want all of it to be completed through the website. So passing the output (image of animal and label such as "great pyrenees") through the web API, into a VBA script somehow, and having the ability to download or save the populated document.
I am open to using VBA, python's win32 , python's docx library, or any other suggestions.
Thank you!

How to export image in powerpoint using asp.net core 2.0

I have to export some images into powerpoint (.ppt or .pptx format) using asp.net core 2.0. Any ideas welcome!
Maybe you could use SlideMight, a data merge tool for PowerPoint.
You should be able to get 1 slide per image, or 1 table row per image, or 1 table cell, or so. You can also make a thumbnail slide that links to 15 detail slides. You define this in a "pattern file", which is much like a PowerPoint template.
Your asp.net program should write the images to the file system, or have URLs available. It should also create an input data file (XML, JSON or YAML) that refers to these images. Then it should invoke SlideMight to generate the desired presentation. Normally SlideMight runs in a GUI. It should also be able to run as a command line program, although this has not been tested lately (please let me know if you need it).
Would this be of use?
Disclaimer: I am the developer and vendor of SlideMight.

extract infopath xml data into excel

Hi I have a sharepoint library, in which first column is a InfoPath xml column. There are around 2000 xmls in the list. I want to export the data from InfoPath in excel, but using "Export to excel" I am getting all columns of library in excel with first column data as InfoPath path
SharePoint 2010 does not have a column type of "InfoPath xml column". SharePoint libraries have files. The contents of InfoPath forms are stored as xml files within a SharePoint form library. You're asking for a way to open all files in a SharePoint library as text files, then take their contents and paste them into an Excel column? That functionality is definitely supported out of the box. Depending on your skillset, you could make an Excel macro, create form code to export the xml through InfoPath, or use PowerShell to scrape the data.

How can I export the contents of a data bound datagridview to word in vb.net?

I have found ways to do this in c# or asp.net, but I need VB.net. I have a dataviewgrid that I need to export to a .doc file (i am sure I can figure out the formatting and such of the doc). Or, if that is too complex, to an excel file.
There seems to be many asp.net examples, but nothing that works in vb studio on vb.
In the past displayed the datagridview on screen and changed the mime type of the page to application/excel. It will automatically open in an embedded excel file.
Try this link for how to do it: http://support.microsoft.com/kb/317719

How can I display excel data with the .xlsx exstension in my windows application using data grid view?

I have an excel file that I would like to load into my form and display there. Is there any way to do this? Sorry I am fairly new at visual studio as well as visual basic. If anybody could help me out with this it would be great thanks.
There are several options - all involve some additional library:
OpenXML 2.0 (free library from MS) can be used to read/modify the content of an .xlsx so you can display it anyway you want (for example in a data grid view)
some (commercial) 3rd-party libraries come with grid controls allowing you to display excel files in your application (be it Winforms/WPF/ASP.NET...) like SpreadsheetGear, Aspose.Cells etc.