Click here to Skip to main content
16,013,322 members

Comments by Westlmorland (Top 4 by date)

Westlmorland 22-Mar-17 6:44am View    
You could try, as suggested below, using the OpenXML SDK, but be ready to invest quite some time in order to achieve this with it.
You'll need to create a presentation package and the slide package part for the content. You'll also need to create another package which you'll embed into your presentation package. This other package will be an Excel file in which you'll create a worksheet package part and add a chart element into it. After all that you'll still need to generate a current representation of that embedded package which could be rather troublesome to achieve (see this).

As an alternative I would suggest you to take an approach demonstrated on this example for PPTX usage in C# and VB.NET. Also this example demonstrates how you can create Excel chart in C# and VB.NET, after creating it you can save that Chart element to image and use that image in your PPTX file.
Westlmorland 22-Mar-17 6:24am View    
I previously used iTextSharp, but they changed the license and are no longer free, so I moved to this c# library for PDF format. It provides a model which I would say is similar to flow documents (like HTML, DOCX) and thus makes generating of PDF files from c# a lot easier.
Westlmorland 21-Mar-17 8:12am View    
Try this:

using (SmtpClient smtp = new SmtpClient(" (e.g. smtp.gmail.com)", ConnectionSecurity.Ssl, true))
{
smtp.Connect();
Console.WriteLine("Connected.");

smtp.Authenticate("<username>", "<password>");
Console.WriteLine("Authenticated.");

// ...
}

The code uses this smtp client for c#.
Also here is a complete example on how you can send email in asp.net application with c# or vb.net.
Westlmorland 21-Mar-17 8:02am View    
You could use this C# code to export to Excel after which you could apply the desired styling to ExcelColumnRowBase.Style property.
But instead of that you could use a direct method, DataGridViewConverter.ImportFromDataGridView, which is provided by this c# library for Excel, you can find an example of how to do that here.