Click here to Skip to main content
15,907,183 members

Comments by irwin.potter (Top 3 by date)

irwin.potter 5-Jul-17 5:56am View    
You can use a PowerPoint library for C# or VB.NET to do this (see Charts and Diagrams example).
irwin.potter 5-Jul-17 5:51am View    
First I would suggest you to take a look at this Word and PDF library for C#, it can enable you to straightforwardly convert a HTML content into PDF format from C#. For example:

StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);

pnlCertificate.RenderControl(hw);
pnlCertificate.Style.Add("border", "2px solid black");
pnlCertificate.Style.Add("margin-top", "60px");
pnlCertificate.Style.Add("text-align", "justify");

DocumentModel document = new DocumentModel();
document.Content.LoadText(sw.ToString(), LoadOptions.HtmlDefault);

// You could use the following to download a PDF file.
//document.Save(Response, "Document.pdf");

// Or you could use the following to save PDF to stream.
MemoryStream stream = new MemoryStream();
document.Save(stream, SaveOptions.PdfDefault);

Now regarding the mail, you could use this email library for C# and use the following code to send an email message with attachment in C#.
irwin.potter 5-Jul-17 5:39am View    
Here is another solution for reading .csv in c#. Actually you can use exactly the same approach for reading any other Excel format.