Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

nuget.org : mpsc.plenosoft.office.plenoexcel

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 MPSC.PlenoSoft.Office.Planilhas.Controller; using MPSC.PlenoSoft.Office.Planilhas.Integracao; using MPSC.PlenoSoft.Office.Planilhas.Util; namespace MPSC.PlenoSoft.Office.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(); } } }

Registry - Homepage - JSON
purl: pkg:nuget/mpsc.plenosoft.office.plenoexcel
Keywords: Document, Format, Open, Xml, Office, Excel, Planilha, Pleno, Soft, DocumentFormat, OpenXml, Exportar
License:
Latest release: over 124 years ago
First release: over 124 years ago
Last synced: 12 days ago

    Loading...
    Readme
    Loading...