MPSTI.PlenoSoft.Core.Office.OpenXml 1.0.0.18

There is a newer version of this package available.
See the version list below for details.

Requires NuGet 3.5.0 or higher.

dotnet add package MPSTI.PlenoSoft.Core.Office.OpenXml --version 1.0.0.18                
NuGet\Install-Package MPSTI.PlenoSoft.Core.Office.OpenXml -Version 1.0.0.18                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MPSTI.PlenoSoft.Core.Office.OpenXml" Version="1.0.0.18" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MPSTI.PlenoSoft.Core.Office.OpenXml --version 1.0.0.18                
#r "nuget: MPSTI.PlenoSoft.Core.Office.OpenXml, 1.0.0.18"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MPSTI.PlenoSoft.Core.Office.OpenXml as a Cake Addin
#addin nuget:?package=MPSTI.PlenoSoft.Core.Office.OpenXml&version=1.0.0.18

// Install MPSTI.PlenoSoft.Core.Office.OpenXml as a Cake Tool
#tool nuget:?package=MPSTI.PlenoSoft.Core.Office.OpenXml&version=1.0.0.18                

Pleno Excel é um façade para o DocumentFormat.OpenXML muito simples de utilizar.

using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MPSTI.PlenoSoft.Core.Office.OpenXml.Planilhas.Controller;
using MPSTI.PlenoSoft.Core.Office.OpenXml.Planilhas.Integracao;
using MPSTI.PlenoSoft.Core.Office.OpenXml.Planilhas.Util;

namespace MPSTI.PlenoSoft.Core.Office.OpenXml.Testes.Unidade
{
[TestClass]
public class TestandoGeradorDePlanilha
{
private static readonly String cRoot = File.Exists(@"C:\Temp\") ? @"C:\Temp" : Path.GetTempPath();

[TestMethod]
public void Quando_Converte0()
{
var leads = new List<Lead>();
for (int i = 0; i < 10; i++)
{
var lead = new Lead { Properties = i };
leads.Add(lead);
}

var arquivo = new FileInfo(cRoot + @"\OfficeDTO.xlsx");
var plenoExcel = new PlenoExcel(arquivo, Modo.Padrao | Modo.ApagarSeExistir);
plenoExcel.Exportar(leads);
plenoExcel.Fechar();
}

[TestMethod]
public void Quando_Grava_Uma_Planilha_Excel()
{
var arquivoExcel = new FileInfo(cRoot + @"\PlenoExcel.xlsx");
var plenoExcel = new PlenoExcel(arquivoExcel, Modo.Seguro | Modo.SempreCriaNovo);

var plan1 = plenoExcel["Plan1"];

plan1.Escrever("A", 1, "Numero 1", Style.Header);
plan1.Escrever("B", 1, "Número 2", Style.Header);
plan1.Escrever("C", 1, "Soma", Style.Header);

plan1.Escrever("A", 2, 6, Style.Geral);
plan1.Escrever("B", 2, 4, Style.Geral);
plan1.Escrever("C", 2, "=SUM(A2:B2)", Style.Geral);

plenoExcel.Salvar();
plenoExcel.Fechar();
}


[TestMethod]
public void Exemplo_De_Como_Gerar_Uma_Planilha_Excel_A_Partir_De_Uma_Lista_De_DTOs()
{
var arquivoExcel = new FileInfo(@"C:\Temp\PlenoExcel.xlsx");
var plenoExcel = new PlenoExcel(arquivoExcel, Modo.Padrao | Modo.ApagarSeExistir);
plenoExcel.Exportar(listaDTO);
plenoExcel.Fechar();
}
}
}

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible.  net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0.1 180 9/20/2023
1.0.0.18 390 11/7/2022

(Atual)
2022/11/05 - 1.0.0.18 -> Refatoração e limpeza do projeto, com alteração do nome de PlenoMapa para ExcelColumnAttribute;
2021/05/07 - 1.0.0.17 -> Correção do bug de exportar uma lista de DTOs;
2018/04/26 - 1.0.0.16 -> Inclusão da suíte de testes unitários e reestruturação das pastas de código fonte;
2018/02/02 - 1.0.0.15 -> Correção do bug de exportar campo do tipo Decimal;
2017/10/20 - 1.0.0.14 -> Possibilitar o carregamento automático da configuração através de arquivo XML;
2017/10/18 - 1.0.0.13 -> Correção do posicionamento do cabeçalho;
2017/09/14 - 1.0.0.12 -> Implementando a configuração através de recursos externos da aplicação;
2017/08/17 - 1.0.0.11 -> Suporte à Backup durante a manipulação de arquivos;
2017/08/07 - 1.0.0.10 -> Configuração de campos através de Atributos no DTO;
2017/08/06 - 1.0.0.09 -> Exportação de Listas de um DTO como sheets da planilha;
2017/08/05 - 1.0.0.08 -> Versão Inicial do façade para o DocumentFormat.OpenXML muito simples de utilizar;