Data Browser - Viewing Site  Sector 23 Code Bank Logged in as:  Guest  


Re: How to Create a Bar Graph / 3D Pie Chart in PowerPoint using .NET OpenXML API
> View Original Message
Hi, thanks for quick reply and also thanks for this wonderful post.

Here is my code where I am calling Excel Tools:

var dt = new System.Data.DataTable();
foreach (string st in seriesTitles)
dt.Columns.Add(st, typeof(int));
foreach (string key in dict.Keys)
var dr = dt.NewRow();
dr[0] = key;
int[] arr = dict[key];
for (int i = 1; i <= arr.Length; i++)
dr[i] = arr[i - 1];

string tempCsv = Path.Combine(workingTempFolder, Guid.NewGuid().ToString() + ".xlsx"); // get random file name
if (File.Exists(tempCsv))
ExcelTools.CreatePackage(tempCsv, dt, true);

using (Stream data = new MemoryStream(File.ReadAllBytes(tempCsv)))

if (File.Exists(tempCsv))
File.Delete(tempCsv); // remove our file we created

Created By: Guest 1/5/2017 5:00:21 AM