<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>ExcelPackage: Office Open XML Format file creation</title><link>http://excelpackage.codeplex.com/project/feeds/rss</link><description>ExcelPackage provides server-side generation of Excel 2007 spreadsheets.   It is a set of classes and wrappers around the .NET 3.0 System.IO.Packaging API and the new Office Open XML file format. It extracts away the complexity of dealing with the individual XML components making it real easy to create sophisticated spreadsheets on the server.</description><item><title>New Post: Inserting Row(s)</title><link>http://excelpackage.codeplex.com/discussions/443860</link><description>&lt;div style="line-height: normal;"&gt;How to insert row(s) in existing Excel file with ExcelPackage&lt;br /&gt;
&lt;/div&gt;</description><author>Ogo</author><pubDate>Thu, 16 May 2013 07:53:33 GMT</pubDate><guid isPermaLink="false">New Post: Inserting Row(s) 20130516075333A</guid></item><item><title>New Post: Inserting Row(s)</title><link>http://excelpackage.codeplex.com/discussions/443860</link><description>&lt;div style="line-height: normal;"&gt;How to insert row(s) in existing Excel file with ExcelPackage&lt;br /&gt;
&lt;/div&gt;</description><author>Ogo</author><pubDate>Thu, 16 May 2013 07:53:33 GMT</pubDate><guid isPermaLink="false">New Post: Inserting Row(s) 20130516075333A</guid></item><item><title>New Post: C# MVC, SQL to Excel</title><link>http://excelpackage.codeplex.com/discussions/443601</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
I want to make &lt;strong&gt;some tabs&lt;/strong&gt; in my worksheet when I pass the information between DataBase and Excel.&lt;br /&gt;
In the first tab I want the information with some especific ordering and grouping(it's done), and in the second one I want the information without constraints.&lt;br /&gt;
I copied the code if anybody could help me to create that second tab.&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  public FileResult GenerarExcel(string usuario, DateTime? fechadesde, DateTime? fechahasta, string proyecto, EnumsAppNameIncidemcias departamento = EnumsAppNameIncidemcias.NoDefinido)&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;    {
        //var lista_usuarios = usuario.Split(',').ToList();
        var partes = db.ParteHorasIncidenciasAvenir.AsQueryable();

        if (!String.IsNullOrEmpty(usuario))
        {
            partes = partes.Where(c =&amp;gt; c.Nom_Usuario.Contains(usuario));
        }
        if (fechadesde.HasValue &amp;amp;&amp;amp; fechahasta.HasValue)
        {
            partes = partes.Where(c =&amp;gt; c.Fecha &amp;gt;= fechadesde.Value &amp;amp;&amp;amp; c.Fecha &amp;lt;= fechahasta.Value);
        }
        if (!departamento.CompararConEnum(EnumsAppNameIncidemcias.Todos) &amp;amp;&amp;amp; !departamento.CompararConEnum(EnumsAppNameIncidemcias.NoDefinido))
        {
            partes = partes.Where(c =&amp;gt; c.Nom_Dep == departamento.ToCodigo());
        }
        if (!String.IsNullOrEmpty(proyecto))
        {
            partes = partes.Where(c =&amp;gt; c.Proyecto == proyecto);
        }

        var listapartes = partes.ToList();

        using (ExcelPackage pck = new ExcelPackage())
        {
            var partesAgrupados = listapartes.GroupBy(c =&amp;gt; c.Nom_Dep);

            foreach (var parteagrupado in partesAgrupados)
            {

                //Create the worksheet 
                ExcelWorksheet ws = pck.Workbook.Worksheets.Add(parteagrupado.Key);



                ws.Cells[&amp;quot;A1&amp;quot;].Value = &amp;quot;Fecha&amp;quot;;
                ws.Cells[&amp;quot;B1&amp;quot;].Value = &amp;quot;Nombre&amp;quot;;
                ws.Cells[&amp;quot;C1&amp;quot;].Value = &amp;quot;Unidad de Negocio&amp;quot;;
                ws.Cells[&amp;quot;D1&amp;quot;].Value = &amp;quot;Proyecto&amp;quot;;
                ws.Cells[&amp;quot;E1&amp;quot;].Value = &amp;quot;Tarea&amp;quot;;
                ws.Cells[&amp;quot;F1&amp;quot;].Value = &amp;quot;Descripcion&amp;quot;;
                ws.Cells[&amp;quot;G1&amp;quot;].Value = &amp;quot;Minutos&amp;quot;;
                ws.Cells[&amp;quot;H1&amp;quot;].Value = &amp;quot;Vinculado a Incidencia&amp;quot;;


                //Format the header for column 1-3
                using (ExcelRange rng = ws.Cells[&amp;quot;A1:H1&amp;quot;])
                {
                    rng.Style.Font.Bold = true;
                    rng.Style.Fill.PatternType = ExcelFillStyle.Solid;                      //Set Pattern for the background to Solid
                    rng.Style.Fill.BackgroundColor.SetColor(Color.FromArgb(79, 129, 189));  //Set color to dark blue
                    rng.Style.Font.Color.SetColor(Color.White);
                }


                var parteagrupadoOrdenado = parteagrupado.OrderByDescending(c =&amp;gt; c.Fecha).ThenBy(c =&amp;gt; c.Nom_Usuario);
                var i = 2;
                foreach (var l in parteagrupadoOrdenado)
                {
                    ws.Cells[&amp;quot;A&amp;quot; + i].Value = l.Fecha.ToShortDateString();
                    ws.Cells[&amp;quot;B&amp;quot; + i].Value = l.Nom_Usuario;
                    ws.Cells[&amp;quot;C&amp;quot; + i].Value = l.Nom_Dep;
                    ws.Cells[&amp;quot;D&amp;quot; + i].Value = l.Proyecto;
                    ws.Cells[&amp;quot;E&amp;quot; + i].Value = l.Tarea;
                    ws.Cells[&amp;quot;F&amp;quot; + i].Value = l.Descripción;
                    ws.Cells[&amp;quot;G&amp;quot; + i].Value = l.Minutos;
                    ws.Cells[&amp;quot;H&amp;quot; + i].Value = l.id_I;

                    i++;
                }
            }                   

                //Write it back to the client
                // Response.ContentType = &amp;quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&amp;quot;;
                //Response.AddHeader(&amp;quot;content-disposition&amp;quot;, &amp;quot;attachment;  filename=ParteIncidencias.xlsx&amp;quot;);

                var memoryStream = pck.GetAsByteArray();
                var fileName = &amp;quot;ParteHorasOrdenado.xlsx&amp;quot;;
                return base.File(memoryStream, &amp;quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&amp;quot;, fileName);
        }&lt;/code&gt;&lt;/pre&gt;

}&lt;br /&gt;
&lt;/div&gt;</description><author>bohaes</author><pubDate>Tue, 14 May 2013 14:29:21 GMT</pubDate><guid isPermaLink="false">New Post: C# MVC, SQL to Excel 20130514022921P</guid></item><item><title>New Post: C# MVC, SQL to Excel</title><link>http://excelpackage.codeplex.com/discussions/443601</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
I want to make &lt;strong&gt;some tabs&lt;/strong&gt; in my worksheet when I pass the information between DataBase and Excel.&lt;br /&gt;
In the first tab I want the information with some especific ordering and grouping(it's done), and in the second one I want the information without constraints.&lt;br /&gt;
I copied the code if anybody could help me to create that second tab.&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  public FileResult GenerarExcel(string usuario, DateTime? fechadesde, DateTime? fechahasta, string proyecto, EnumsAppNameIncidemcias departamento = EnumsAppNameIncidemcias.NoDefinido)&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;    {
        //var lista_usuarios = usuario.Split(',').ToList();
        var partes = db.ParteHorasIncidenciasAvenir.AsQueryable();

        if (!String.IsNullOrEmpty(usuario))
        {
            partes = partes.Where(c =&amp;gt; c.Nom_Usuario.Contains(usuario));
        }
        if (fechadesde.HasValue &amp;amp;&amp;amp; fechahasta.HasValue)
        {
            partes = partes.Where(c =&amp;gt; c.Fecha &amp;gt;= fechadesde.Value &amp;amp;&amp;amp; c.Fecha &amp;lt;= fechahasta.Value);
        }
        if (!departamento.CompararConEnum(EnumsAppNameIncidemcias.Todos) &amp;amp;&amp;amp; !departamento.CompararConEnum(EnumsAppNameIncidemcias.NoDefinido))
        {
            partes = partes.Where(c =&amp;gt; c.Nom_Dep == departamento.ToCodigo());
        }
        if (!String.IsNullOrEmpty(proyecto))
        {
            partes = partes.Where(c =&amp;gt; c.Proyecto == proyecto);
        }

        var listapartes = partes.ToList();

        using (ExcelPackage pck = new ExcelPackage())
        {
            var partesAgrupados = listapartes.GroupBy(c =&amp;gt; c.Nom_Dep);

            foreach (var parteagrupado in partesAgrupados)
            {

                //Create the worksheet 
                ExcelWorksheet ws = pck.Workbook.Worksheets.Add(parteagrupado.Key);



                ws.Cells[&amp;quot;A1&amp;quot;].Value = &amp;quot;Fecha&amp;quot;;
                ws.Cells[&amp;quot;B1&amp;quot;].Value = &amp;quot;Nombre&amp;quot;;
                ws.Cells[&amp;quot;C1&amp;quot;].Value = &amp;quot;Unidad de Negocio&amp;quot;;
                ws.Cells[&amp;quot;D1&amp;quot;].Value = &amp;quot;Proyecto&amp;quot;;
                ws.Cells[&amp;quot;E1&amp;quot;].Value = &amp;quot;Tarea&amp;quot;;
                ws.Cells[&amp;quot;F1&amp;quot;].Value = &amp;quot;Descripcion&amp;quot;;
                ws.Cells[&amp;quot;G1&amp;quot;].Value = &amp;quot;Minutos&amp;quot;;
                ws.Cells[&amp;quot;H1&amp;quot;].Value = &amp;quot;Vinculado a Incidencia&amp;quot;;


                //Format the header for column 1-3
                using (ExcelRange rng = ws.Cells[&amp;quot;A1:H1&amp;quot;])
                {
                    rng.Style.Font.Bold = true;
                    rng.Style.Fill.PatternType = ExcelFillStyle.Solid;                      //Set Pattern for the background to Solid
                    rng.Style.Fill.BackgroundColor.SetColor(Color.FromArgb(79, 129, 189));  //Set color to dark blue
                    rng.Style.Font.Color.SetColor(Color.White);
                }


                var parteagrupadoOrdenado = parteagrupado.OrderByDescending(c =&amp;gt; c.Fecha).ThenBy(c =&amp;gt; c.Nom_Usuario);
                var i = 2;
                foreach (var l in parteagrupadoOrdenado)
                {
                    ws.Cells[&amp;quot;A&amp;quot; + i].Value = l.Fecha.ToShortDateString();
                    ws.Cells[&amp;quot;B&amp;quot; + i].Value = l.Nom_Usuario;
                    ws.Cells[&amp;quot;C&amp;quot; + i].Value = l.Nom_Dep;
                    ws.Cells[&amp;quot;D&amp;quot; + i].Value = l.Proyecto;
                    ws.Cells[&amp;quot;E&amp;quot; + i].Value = l.Tarea;
                    ws.Cells[&amp;quot;F&amp;quot; + i].Value = l.Descripción;
                    ws.Cells[&amp;quot;G&amp;quot; + i].Value = l.Minutos;
                    ws.Cells[&amp;quot;H&amp;quot; + i].Value = l.id_I;

                    i++;
                }
            }                   

                //Write it back to the client
                // Response.ContentType = &amp;quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&amp;quot;;
                //Response.AddHeader(&amp;quot;content-disposition&amp;quot;, &amp;quot;attachment;  filename=ParteIncidencias.xlsx&amp;quot;);

                var memoryStream = pck.GetAsByteArray();
                var fileName = &amp;quot;ParteHorasOrdenado.xlsx&amp;quot;;
                return base.File(memoryStream, &amp;quot;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&amp;quot;, fileName);
        }&lt;/code&gt;&lt;/pre&gt;

}&lt;br /&gt;
&lt;/div&gt;</description><author>bohaes</author><pubDate>Tue, 14 May 2013 14:29:21 GMT</pubDate><guid isPermaLink="false">New Post: C# MVC, SQL to Excel 20130514022921P</guid></item><item><title>New Comment on "Reading data from an Excel spreadsheet"</title><link>https://excelpackage.codeplex.com/wikipage?title=Reading data from an Excel spreadsheet&amp;ANCHOR#C27481</link><description>For the existingFile parameter, you can pass a FileInfo object containing the path to your excel file or a stream containing the excel data. There are quite a many overloads of the constructor. I usually use these two.</description><author>zins</author><pubDate>Tue, 14 May 2013 14:28:17 GMT</pubDate><guid isPermaLink="false">New Comment on "Reading data from an Excel spreadsheet" 20130514022817P</guid></item><item><title>New Comment on "Reading data from an Excel spreadsheet"</title><link>https://excelpackage.codeplex.com/wikipage?title=Reading data from an Excel spreadsheet&amp;ANCHOR#C27480</link><description>The number of rows  can be found by saying &amp;#39;worksheet.Dimension.End.Row&amp;#39;. The number of columns can found in a similar way.</description><author>zins</author><pubDate>Tue, 14 May 2013 14:26:52 GMT</pubDate><guid isPermaLink="false">New Comment on "Reading data from an Excel spreadsheet" 20130514022652P</guid></item><item><title>New Post: Work on a MemoryStream instead of a File</title><link>http://excelpackage.codeplex.com/discussions/234877</link><description>&lt;div style="line-height: normal;"&gt;Nice job. Thanks.&lt;br /&gt;
&lt;/div&gt;</description><author>rosborn</author><pubDate>Wed, 17 Apr 2013 16:38:29 GMT</pubDate><guid isPermaLink="false">New Post: Work on a MemoryStream instead of a File 20130417043829P</guid></item><item><title>New Post: Work on a MemoryStream instead of a File</title><link>http://excelpackage.codeplex.com/discussions/234877</link><description>&lt;div style="line-height: normal;"&gt;Nice job. Thanks.&lt;br /&gt;
&lt;/div&gt;</description><author>rosborn</author><pubDate>Wed, 17 Apr 2013 16:38:29 GMT</pubDate><guid isPermaLink="false">New Post: Work on a MemoryStream instead of a File 20130417043829P</guid></item><item><title>New Post: Save as PDF</title><link>http://excelpackage.codeplex.com/discussions/431117</link><description>&lt;div style="line-height: normal;"&gt;Please provide code for&lt;br /&gt;
excel  file save as pdf using ExcelPackage excel&lt;br /&gt;
&lt;/div&gt;</description><author>sajeev1</author><pubDate>Mon, 15 Apr 2013 14:09:28 GMT</pubDate><guid isPermaLink="false">New Post: Save as PDF 20130415020928P</guid></item><item><title>New Post: Save as PDF</title><link>http://excelpackage.codeplex.com/discussions/431117</link><description>&lt;div style="line-height: normal;"&gt;Please provide code for&lt;br /&gt;
excel  file save as pdf using ExcelPackage excel&lt;br /&gt;
&lt;/div&gt;</description><author>sajeev1</author><pubDate>Mon, 15 Apr 2013 14:09:28 GMT</pubDate><guid isPermaLink="false">New Post: Save as PDF 20130415020928P</guid></item><item><title>New Post: GROUPING EXCEL ROWS</title><link>http://excelpackage.codeplex.com/discussions/439685</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
can anyone tell me if it is possible to gropu excel rows in c# using open xml? I searched the web but couldn't find anything which would help me.&lt;br /&gt;
&lt;br /&gt;
Any help on this is highly appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
vamsi&lt;br /&gt;
&lt;/div&gt;</description><author>vamsipunna</author><pubDate>Tue, 09 Apr 2013 18:00:52 GMT</pubDate><guid isPermaLink="false">New Post: GROUPING EXCEL ROWS 20130409060052P</guid></item><item><title>New Post: GROUPING EXCEL ROWS</title><link>http://excelpackage.codeplex.com/discussions/439685</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
can anyone tell me if it is possible to gropu excel rows in c# using open xml? I searched the web but couldn't find anything which would help me.&lt;br /&gt;
&lt;br /&gt;
Any help on this is highly appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
vamsi&lt;br /&gt;
&lt;/div&gt;</description><author>vamsipunna</author><pubDate>Tue, 09 Apr 2013 18:00:52 GMT</pubDate><guid isPermaLink="false">New Post: GROUPING EXCEL ROWS 20130409060052P</guid></item><item><title>New Post: GROUPING EXCEL ROWS</title><link>http://excelpackage.codeplex.com/discussions/439685</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
can anyone tell me if it is possible to gropu excel rows in c# using open xml? I searched the web but couldn't find anything which would help me.&lt;br /&gt;
&lt;br /&gt;
Any help on this is highly appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
vamsi&lt;br /&gt;
&lt;/div&gt;</description><author>vamsipunna</author><pubDate>Tue, 09 Apr 2013 18:00:52 GMT</pubDate><guid isPermaLink="false">New Post: GROUPING EXCEL ROWS 20130409060052P</guid></item><item><title>New Post: Grouping Rows c# with ExcelPackage</title><link>http://excelpackage.codeplex.com/discussions/227493</link><description>&lt;div style="line-height: normal;"&gt;Hi ccortiz,&lt;br /&gt;
&lt;br /&gt;
I am facing the same problem, couldn't find anything which allows me to gropu rows through excelpackage (ooxml). Could you let me know if you have found solution for this problem?&lt;br /&gt;
&lt;/div&gt;</description><author>vamsipunna</author><pubDate>Tue, 09 Apr 2013 17:59:23 GMT</pubDate><guid isPermaLink="false">New Post: Grouping Rows c# with ExcelPackage 20130409055923P</guid></item><item><title>New Post: Grouping Rows c# with ExcelPackage</title><link>http://excelpackage.codeplex.com/discussions/227493</link><description>&lt;div style="line-height: normal;"&gt;Hi ccortiz,&lt;br /&gt;
&lt;br /&gt;
I am facing the same problem, couldn't find anything which allows me to gropu rows through excelpackage (ooxml). Could you let me know if you have found solution for this problem?&lt;br /&gt;
&lt;/div&gt;</description><author>vamsipunna</author><pubDate>Tue, 09 Apr 2013 17:59:23 GMT</pubDate><guid isPermaLink="false">New Post: Grouping Rows c# with ExcelPackage 20130409055923P</guid></item><item><title>New Post: Save as PDF</title><link>http://excelpackage.codeplex.com/discussions/431117</link><description>&lt;div style="line-height: normal;"&gt;Have you figured this out?&lt;br /&gt;
&lt;/div&gt;</description><author>dharric</author><pubDate>Mon, 08 Apr 2013 16:09:58 GMT</pubDate><guid isPermaLink="false">New Post: Save as PDF 20130408040958P</guid></item><item><title>New Post: Save as PDF</title><link>http://excelpackage.codeplex.com/discussions/431117</link><description>&lt;div style="line-height: normal;"&gt;Have you figured this out?&lt;br /&gt;
&lt;/div&gt;</description><author>dharric</author><pubDate>Mon, 08 Apr 2013 16:09:58 GMT</pubDate><guid isPermaLink="false">New Post: Save as PDF 20130408040958P</guid></item><item><title>New Post: How to Execute Excel Macro</title><link>http://excelpackage.codeplex.com/discussions/438991</link><description>&lt;div style="line-height: normal;"&gt;I have a macro enabled excel file and i want to execute macro using this package.&lt;br /&gt;
Can anybody tell me the exact command to execute excel macro using this package.&lt;br /&gt;
&lt;br /&gt;
Any help should be appreciated&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;/div&gt;</description><author>mehtapraveen1982</author><pubDate>Wed, 03 Apr 2013 17:36:02 GMT</pubDate><guid isPermaLink="false">New Post: How to Execute Excel Macro 20130403053602P</guid></item><item><title>New Post: How to Execute Excel Macro</title><link>http://excelpackage.codeplex.com/discussions/438991</link><description>&lt;div style="line-height: normal;"&gt;I have a macro enabled excel file and i want to execute macro using this package.&lt;br /&gt;
Can anybody tell me the exact command to execute excel macro using this package.&lt;br /&gt;
&lt;br /&gt;
Any help should be appreciated&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;/div&gt;</description><author>mehtapraveen1982</author><pubDate>Wed, 03 Apr 2013 17:36:02 GMT</pubDate><guid isPermaLink="false">New Post: How to Execute Excel Macro 20130403053602P</guid></item><item><title>New Post: How to set Auto width </title><link>http://excelpackage.codeplex.com/discussions/248406</link><description>&lt;div style="line-height: normal;"&gt;Any idea why this doesn't work? I'm using Excel 2010.&lt;br /&gt;
&lt;/div&gt;</description><author>pashkatarakashka</author><pubDate>Tue, 19 Mar 2013 16:12:46 GMT</pubDate><guid isPermaLink="false">New Post: How to set Auto width  20130319041246P</guid></item></channel></rss>