Crea elenco a discesa in Excel - Guida passo passo

La creazione di un elenco a discesa in Excel è un modo semplice per semplificare l'immissione dei dati e ridurre gli errori. Quando gli utenti digitano le informazioni manualmente, le incongruenze nell'ortografia o nella formattazione possono rendere i dati più difficili da filtrare o analizzare. Un elenco a discesa risolve questo problema consentendo agli utenti di scegliere tra opzioni predefinite, garantendo coerenza e risparmiando tempo.

In questa guida imparerai come creare in modo efficiente un elenco a discesa in Excel. Tratteremo i metodi manuali che utilizzano le funzionalità integrate di Excel e i metodi programmatici che utilizzano C#, Java e Python.

Crea elenchi a discesa in Excel manualmente

La creazione manuale di un elenco a discesa è semplice e ideale per piccoli set di dati o moduli una tantum. Per creare manualmente un elenco a discesa, è possibile utilizzare la funzione Convalida dati in Excel. Segui i passaggi seguenti:

  1. Apri il tuo file Excel e seleziona la cella o l'intervallo in cui desideri che appaia l'elenco a discesa, ad esempio la cella C2:C6 per lo stato dell'attività.

    Crea elenco a discesa in Excel - Seleziona celle o intervallo per l'elenco a discesa

  2. Vai alla scheda Dati sulla barra multifunzione di Excel, fai clic su Convalida dati, quindi su Convalida dati…, e si aprirà la seguente finestra di dialogo per consentirti di configurare l'elenco a discesa.

    Crea elenco a discesa in Excel - Apri la finestra di dialogo Convalida dati

  3. Nella scheda Impostazioni della finestra di dialogo, seleziona Elenco dal menu a discesa Consenti. Nella casella Origine, puoi digitare direttamente gli elementi dell'elenco, separati da virgole (ad esempio: In sospeso, In corso, Completato), oppure selezionare un intervallo di celle (ad esempio, J1:J3) nel tuo foglio di lavoro che contiene questi valori. Se utilizzi un intervallo di celle, l'elenco a discesa si aggiornerà automaticamente ogni volta che i dati di origine cambiano.

    Crea elenco a discesa in Excel - Configura origine elenco

  4. Puoi anche configurare le opzioni per ignorare le celle vuote, mostrare la freccia a discesa, visualizzare un messaggio di input o impostare un avviso di errore per le voci non valide.

    Crea elenco a discesa in Excel - Configura impostazioni opzionali per l'elenco

  5. Fai clic su OK per applicare l'elenco a discesa. Le celle selezionate ora mostreranno una freccia a discesa, che ti consentirà di scegliere dall'elenco predefinito. Puoi copiare l'elenco a discesa in altre celle o utilizzare intervalli denominati per gestire facilmente set di dati più grandi.

    Crea elenco a discesa in Excel - Applica l'elenco a discesa e visualizza l'output

Crea elenco a discesa in Excel programmaticamente utilizzando il codice: Guida per sviluppatori

Per gli sviluppatori che necessitano di automazione, la creazione programmatica di elenchi a discesa è più efficiente. Spire.XLS è una potente libreria Excel che consente agli sviluppatori di manipolare i file Excel interamente tramite codice, senza richiedere l'installazione di Microsoft Excel.

Supporta una vasta gamma di operazioni come la creazione di fogli di lavoro, la formattazione di celle, la creazione di tabelle e l'aggiunta di elenchi a discesa. Utilizzando Spire.XLS, gli sviluppatori possono automatizzare la convalida dei dati di Excel, garantire la coerenza tra più file e semplificare le attività ripetitive.

Crea un elenco a discesa in Excel usando C#

Per inserire un elenco a discesa in Excel utilizzando C# con Spire.XLS per .NET, attenersi alla seguente procedura:

  1. Scarica Spire.XLS per .NET dal sito Web ufficiale o installalo direttamente tramite NuGet utilizzando il seguente codice:

    PM> Install-Package Spire.XLS
    
  2. Utilizzare il codice seguente per aggiungere un elenco a discesa a un file Excel in C#.

    using Spire.Xls;
    
    namespace AddDropdownList
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                // Load the existing Excel file
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("Employee_Info.xlsx");
    
                // Get the first worksheet
                Worksheet worksheet = workbook.Worksheets[0];
    
                // Define dropdown list items
                string[] statusList = new string[] { "Pending", "In Progress", "Completed" };
    
                // Apply data validation to the range C2:C6
                CellRange range = worksheet.Range["C2:C6"];
                range.DataValidation.Values = statusList;
    
                // Save the modified file
                workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
                // Release resources
                workbook.Dispose();
            }
        }
    }
    

Leggi il tutorial completo di C#: C#: Crea elenchi a discesa in un documento Excel.

Inserisci un elenco a discesa in Excel usando Java

Fare riferimento ai seguenti passaggi per aggiungere un elenco a discesa a Excel utilizzando Spire.XLS per Java:

  1. Scarica Spire.XLS per Java dal sito Web ufficiale o installalo dal repository Maven utilizzando le seguenti configurazioni:

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.xls</artifactId>
            <version>16.4.1</version>
        </dependency>
    </dependencies>
    
  2. Aggiungi il codice seguente per inserire un elenco a discesa in un file Excel in Java.

    import com.spire.xls.*;
    
    public class AddDropdownList {
        public static void main(String[] args) {
            // Load the existing Excel file
            Workbook workbook = new Workbook();
            workbook.loadFromFile("Employee_Info.xlsx");
    
            // Get the first worksheet
            Worksheet sheet = workbook.getWorksheets().get(0);
    
            // Define dropdown list items
            String[] items = new String[] { "Pending", "In Progress", "Completed" };
    
            // Apply data validation to range C2:C6
            CellRange range = sheet.getRange().get("C2:C6");
            range.getDataValidation().setValues(items);
    
            // Save the modified workbook
            workbook.saveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
            // Dispose resources
            workbook.dispose();
        }
    }
    

Leggi il tutorial completo di Java: Java: Crea un elenco a discesa in Excel.

Crea elenco a discesa di Excel usando Python

Ecco come creare un elenco a discesa di Excel utilizzando Spire.XLS per Python:

  1. Scarica Spire.XLS per Python o installalo da PyPI usando il comando pip:

    pip install spire.xls
    
  2. Utilizzare il codice seguente per creare un elenco a discesa in un file Excel in Python.

    from spire.xls import *
    
    # Load the existing Excel file
    workbook = Workbook()
    workbook.LoadFromFile("Employee_Info.xlsx")
    
    # Get the first worksheet
    worksheet = workbook.Worksheets[0]
    
    # Define dropdown list items
    values = ["Pending", "In Progress", "Completed"]
    
    # Apply data validation to the range C2:C6
    range = worksheet.Range["C2:C6"]
    range.DataValidation.Values = values
    
    # Save the modified workbook
    workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016)
    
    # Dispose of resources
    workbook.Dispose()
    

Leggi il tutorial completo di Python: Python: Crea elenchi a discesa nei fogli di lavoro di Excel.

Conclusione

La creazione di elenchi a discesa in Excel è un modo semplice ma potente per standardizzare l'immissione dei dati e ridurre al minimo gli errori. Per gli utenti occasionali, la funzione di convalida dei dati di Excel fornisce un approccio manuale semplice per aggiungere elenchi a discesa. Per gli sviluppatori e i team che gestiscono più file Excel, l'utilizzo di Spire.XLS in C#, Java o Python consente la creazione programmatica di elenchi a discesa, automatizza le attività ripetitive e garantisce la coerenza dei dati. Sfruttando queste tecniche, gli utenti di Excel possono migliorare la produttività, migliorare l'integrità dei dati e rendere più agevole l'analisi dei dati.

Domande frequenti: Crea elenco a discesa di Excel

D1: Posso modificare un elenco a discesa dopo averlo creato?

R1: Sì. È possibile modificare manualmente le impostazioni di convalida dei dati in Excel o aggiornare gli elementi dell'elenco a livello di codice utilizzando Spire.XLS in C#, Java o Python.

D2: Gli elenchi a discesa possono fare riferimento a un intervallo in un altro foglio di lavoro?

R2: Sì. Nelle impostazioni di convalida dei dati, è possibile selezionare un intervallo da un altro foglio di lavoro come origine per l'elenco a discesa.

D3: Gli utenti possono inserire valori non presenti nell'elenco a discesa?*

R3: Sì. In Excel, deseleziona "Mostra avviso di errore dopo l'immissione di dati non validi" nelle impostazioni di convalida dei dati per consentire voci personalizzate.

D4: Gli elenchi a discesa programmatici sono compatibili con tutte le versioni di Excel?

R4: Sì. Spire.XLS supporta i formati Excel più moderni, inclusi .xlsx, .xls e .xlsm.

D5: Come creare elenchi a discesa dinamici che si aggiornano automaticamente quando i dati di origine cambiano?

R5: Utilizzare un intervallo denominato o una tabella di Excel per l'elenco di origine. Quando la tabella o l'intervallo si aggiorna, l'elenco a discesa riflette automaticamente le modifiche.

D6: Come rimuovere o cancellare un elenco a discesa senza eliminare i dati esistenti?

R6: Vai a Convalida dati, quindi Cancella tutto. In questo modo l'elenco a discesa viene rimosso ma i valori delle celle rimangono intatti.

Vedi anche

Criar Lista Suspensa no Excel - Guia Passo a Passo

Criar uma lista suspensa no Excel é uma maneira fácil de simplificar a entrada de dados e reduzir erros. Quando os usuários digitam informações manualmente, inconsistências na ortografia ou formatação podem dificultar a filtragem ou análise dos dados. Uma lista suspensa resolve esse problema, permitindo que os usuários escolham entre opções predefinidas, garantindo consistência e economizando tempo.

Neste guia, você aprenderá como criar uma lista suspensa no Excel de forma eficiente. Abordaremos métodos manuais usando os recursos integrados do Excel e métodos programáticos usando C#, Java e Python.

Criar Listas Suspensas no Excel Manualmente

Criar uma lista suspensa manualmente é simples e ideal para pequenos conjuntos de dados ou formulários únicos. Para criar manualmente uma lista suspensa, você pode usar o recurso Validação de Dados no Excel. Siga os passos abaixo:

  1. Abra seu arquivo Excel e selecione a célula ou intervalo onde deseja que a lista suspensa apareça, como a célula C2:C6 para o status da tarefa.

    Criar lista suspensa no Excel - Selecionar Células ou Intervalo para a Lista Suspensa

  2. Vá para a guia Dados na faixa de opções do Excel, clique em Validação de Dados e, em seguida, em Validação de Dados…, e a seguinte caixa de diálogo será aberta para permitir que você configure a lista suspensa.

    Criar lista suspensa no Excel - Abrir Caixa de Diálogo de Validação de Dados

  3. Na guia Configurações da caixa de diálogo, selecione Lista no menu suspenso Permitir. Na caixa Fonte, você pode digitar os itens da lista diretamente, separados por vírgulas (por exemplo: Pendente, Em Andamento, Concluído), ou selecionar um intervalo de células (por exemplo, J1:J3) em sua planilha que contenha esses valores. Se você usar um intervalo de células, a lista suspensa será atualizada automaticamente sempre que os dados de origem forem alterados.

    Criar lista suspensa no Excel - Configurar Fonte da Lista

  4. Você também pode configurar opções para ignorar células em branco, mostrar a seta suspensa, exibir uma mensagem de entrada ou definir um alerta de erro para entradas inválidas.

    Criar lista suspensa no Excel - Configurar Configurações Opcionais para a lista

  5. Clique em OK para aplicar a lista suspensa. As células selecionadas agora mostrarão uma seta suspensa, permitindo que você escolha na lista predefinida. Você pode copiar a lista suspensa para outras células ou usar intervalos nomeados para gerenciar conjuntos de dados maiores com facilidade.

    Criar lista suspensa no Excel - Aplicar a Lista Suspensa e Visualizar o Resultado

Criar Lista Suspensa no Excel Programaticamente Usando Código: Guia do Desenvolvedor

Para desenvolvedores que precisam de automação, criar listas suspensas programaticamente é mais eficiente. O Spire.XLS é uma poderosa biblioteca do Excel que permite aos desenvolvedores manipular arquivos do Excel inteiramente por meio de código, sem a necessidade de ter o Microsoft Excel instalado.

Ele suporta uma ampla gama de operações, como criar planilhas, formatar células, criar tabelas e adicionar listas suspensas. Usando o Spire.XLS, os desenvolvedores podem automatizar a validação de dados do Excel, garantir a consistência em vários arquivos e otimizar tarefas repetitivas.

Criar uma Lista Suspensa no Excel usando C#

Para inserir uma lista suspensa no Excel usando C# com o Spire.XLS for .NET, siga estes passos:

  1. Baixe o Spire.XLS for .NET no site oficial ou instale-o diretamente através do NuGet usando o seguinte código:

    PM> Install-Package Spire.XLS
    
  2. Use o seguinte código para adicionar uma lista suspensa a um arquivo Excel em C#.

    using Spire.Xls;
    
    namespace AddDropdownList
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                // Load the existing Excel file
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("Employee_Info.xlsx");
    
                // Get the first worksheet
                Worksheet worksheet = workbook.Worksheets[0];
    
                // Define dropdown list items
                string[] statusList = new string[] { "Pending", "In Progress", "Completed" };
    
                // Apply data validation to the range C2:C6
                CellRange range = worksheet.Range["C2:C6"];
                range.DataValidation.Values = statusList;
    
                // Save the modified file
                workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
                // Release resources
                workbook.Dispose();
            }
        }
    }
    

Leia o tutorial completo de C#: C#: Criar Listas Suspensas em um Documento Excel.

Inserir uma Lista Suspensa no Excel usando Java

Consulte os seguintes passos para adicionar uma lista suspensa ao Excel usando o Spire.XLS for Java:

  1. Baixe o Spire.XLS for Java no site oficial ou instale-o a partir do Repositório Maven usando as seguintes configurações:

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.xls</artifactId>
            <version>16.4.1</version>
        </dependency>
    </dependencies>
    
  2. Adicione o seguinte código para inserir uma lista suspensa em um arquivo Excel em Java.

    import com.spire.xls.*;
    
    public class AddDropdownList {
        public static void main(String[] args) {
            // Load the existing Excel file
            Workbook workbook = new Workbook();
            workbook.loadFromFile("Employee_Info.xlsx");
    
            // Get the first worksheet
            Worksheet sheet = workbook.getWorksheets().get(0);
    
            // Define dropdown list items
            String[] items = new String[] { "Pending", "In Progress", "Completed" };
    
            // Apply data validation to range C2:C6
            CellRange range = sheet.getRange().get("C2:C6");
            range.getDataValidation().setValues(items);
    
            // Save the modified workbook
            workbook.saveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
            // Dispose resources
            workbook.dispose();
        }
    }
    

Leia o tutorial completo de Java: Java: Criar uma Lista Suspensa no Excel.

Criar Lista Suspensa do Excel usando Python

Veja como criar uma lista suspensa no Excel usando o Spire.XLS for Python:

  1. Baixe o Spire.XLS for Python ou instale-o a partir do PyPI usando o comando pip:

    pip install spire.xls
    
  2. Use o seguinte código para criar uma lista suspensa em um arquivo Excel em Python.

    from spire.xls import *
    
    # Load the existing Excel file
    workbook = Workbook()
    workbook.LoadFromFile("Employee_Info.xlsx")
    
    # Get the first worksheet
    worksheet = workbook.Worksheets[0]
    
    # Define dropdown list items
    values = ["Pending", "In Progress", "Completed"]
    
    # Apply data validation to the range C2:C6
    range = worksheet.Range["C2:C6"]
    range.DataValidation.Values = values
    
    # Save the modified workbook
    workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016)
    
    # Dispose of resources
    workbook.Dispose()
    

Leia o tutorial completo de Python: Python: Criar Listas Suspensas em Planilhas do Excel.

Conclusão

Criar listas suspensas no Excel é uma maneira simples, mas poderosa, de padronizar a entrada de dados e minimizar erros. Para usuários casuais, o recurso Validação de Dados do Excel oferece uma abordagem manual e fácil para adicionar listas suspensas. Para desenvolvedores e equipes que lidam com vários arquivos do Excel, o uso do Spire.XLS em C#, Java ou Python permite a criação programática de listas suspensas, automatiza tarefas repetitivas e garante a consistência dos dados. Ao aproveitar essas técnicas, os usuários do Excel podem melhorar a produtividade, aprimorar a integridade dos dados e tornar a análise de dados mais suave.

Perguntas Frequentes: Criar Lista Suspensa do Excel

P1: Posso editar uma lista suspensa depois de criá-la?

R1: Sim. Você pode modificar as configurações de Validação de Dados manualmente no Excel ou atualizar os itens da lista programaticamente usando o Spire.XLS em C#, Java ou Python.

P2: As listas suspensas podem fazer referência a um intervalo em outra planilha?

R2: Sim. Nas configurações de Validação de Dados, você pode selecionar um intervalo de outra planilha como a fonte para sua lista suspensa.

P3: Os usuários podem inserir valores que não estão na lista suspensa?*

R3: Sim. No Excel, desmarque "Mostrar alerta de erro após a inserção de dados inválidos" nas configurações de Validação de Dados para permitir entradas personalizadas.

P4: As listas suspensas programáticas são compatíveis com todas as versões do Excel?

R4: Sim. O Spire.XLS suporta os formatos mais modernos do Excel, incluindo .xlsx, .xls, e .xlsm.

P5: Como criar listas suspensas dinâmicas que se atualizam automaticamente quando os dados de origem mudam?

R5: Use um intervalo nomeado ou uma tabela do Excel para a lista de origem. Quando a tabela ou o intervalo é atualizado, a lista suspensa reflete as alterações automaticamente.

P6: Como remover ou limpar uma lista suspensa sem excluir os dados existentes?

R6: Vá para Validação de Dados e, em seguida, Limpar Tudo. Isso remove a lista suspensa, mas mantém os valores da célula intactos.

Veja Também

Excel에서 드롭다운 목록 만들기 - 단계별 가이드

Excel에서 드롭다운 목록을 만드는 것은 데이터 입력을 단순화하고 오류를 줄이는 쉬운 방법입니다. 사용자가 정보를 수동으로 입력할 때 철자나 서식의 불일치로 인해 데이터를 필터링하거나 분석하기가 더 어려워질 수 있습니다. 드롭다운 목록은 사용자가 미리 정의된 옵션에서 선택하도록 하여 일관성을 보장하고 시간을 절약함으로써 이 문제를 해결합니다.

이 가이드에서는 Excel에서 드롭다운 목록을 효율적으로 만드는 방법을 배웁니다. Excel의 기본 제공 기능을 사용하는 수동 방법과 C#, Java 및 Python을 사용하는 프로그래밍 방법을 다룰 것입니다.

Excel에서 수동으로 드롭다운 목록 만들기

드롭다운 목록을 수동으로 만드는 것은 간단하며 작은 데이터 세트나 일회성 양식에 이상적입니다. 드롭다운 목록을 수동으로 만들려면 Excel의 데이터 유효성 검사 기능을 사용할 수 있습니다. 아래 단계를 따르십시오.

  1. Excel 파일을 열고 작업 상태에 대한 셀 C2:C6과 같이 드롭다운 목록이 표시될 셀 또는 범위를 선택합니다.

    Excel에서 드롭다운 목록 만들기 - 드롭다운에 대한 셀 또는 범위 선택

  2. Excel 리본의 데이터 탭으로 이동하여 데이터 유효성 검사를 클릭한 다음 데이터 유효성 검사…를 클릭하면 드롭다운 목록을 구성할 수 있는 다음 대화 상자가 열립니다.

    Excel에서 드롭다운 목록 만들기 - 데이터 유효성 검사 대화 상자 열기

  3. 대화 상자의 설정 탭에서 허용 드롭다운에서 목록을 선택합니다. 원본 상자에 쉼표로 구분된 목록 항목(예: 보류 중, 진행 중, 완료됨)을 직접 입력하거나 워크시트에서 이러한 값을 포함하는 셀 범위(예: J1:J3)를 선택할 수 있습니다. 셀 범위를 사용하면 원본 데이터가 변경될 때마다 드롭다운 목록이 자동으로 업데이트됩니다.

    Excel에서 드롭다운 목록 만들기 - 목록 원본 구성

  4. 빈 셀을 무시하고, 드롭다운 화살표를 표시하고, 입력 메시지를 표시하거나, 잘못된 항목에 대한 오류 경고를 설정하는 옵션을 구성할 수도 있습니다.

    Excel에서 드롭다운 목록 만들기 - 목록에 대한 선택적 설정 구성

  5. 확인을 클릭하여 드롭다운을 적용합니다. 이제 선택한 셀에 드롭다운 화살표가 표시되어 미리 정의된 목록에서 선택할 수 있습니다. 드롭다운을 다른 셀에 복사하거나 명명된 범위를 사용하여 더 큰 데이터 세트를 쉽게 관리할 수 있습니다.

    Excel에서 드롭다운 목록 만들기 - 드롭다운 적용 및 출력 보기

코드를 사용하여 프로그래밍 방식으로 Excel에서 드롭다운 목록 만들기: 개발자 가이드

자동화가 필요한 개발자에게는 프로그래밍 방식으로 드롭다운 목록을 만드는 것이 더 효율적입니다. Spire.XLS는 개발자가 Microsoft Excel을 설치할 필요 없이 코드를 통해 Excel 파일을 완전히 조작할 수 있게 해주는 강력한 Excel 라이브러리입니다.

워크시트 만들기, 셀 서식 지정, 테이블 만들기, 드롭다운 목록 추가와 같은 광범위한 작업을 지원합니다. Spire.XLS를 사용하면 개발자는 Excel 데이터 유효성 검사를 자동화하고 여러 파일에서 일관성을 보장하며 반복적인 작업을 간소화할 수 있습니다.

C#을 사용하여 Excel에서 드롭다운 목록 만들기

.NET용 Spire.XLS와 함께 C#을 사용하여 Excel에 드롭다운 목록을 삽입하려면 다음 단계를 따르십시오.

  1. 공식 웹사이트에서 .NET용 Spire.XLS를 다운로드하거나 다음 코드를 사용하여 NuGet을 통해 직접 설치하십시오.

    PM> Install-Package Spire.XLS
    
  2. 다음 코드를 사용하여 C#의 Excel 파일에 드롭다운 목록을 추가합니다.

    using Spire.Xls;
    
    namespace AddDropdownList
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                // Load the existing Excel file
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("Employee_Info.xlsx");
    
                // Get the first worksheet
                Worksheet worksheet = workbook.Worksheets[0];
    
                // Define dropdown list items
                string[] statusList = new string[] { "Pending", "In Progress", "Completed" };
    
                // Apply data validation to the range C2:C6
                CellRange range = worksheet.Range["C2:C6"];
                range.DataValidation.Values = statusList;
    
                // Save the modified file
                workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
                // Release resources
                workbook.Dispose();
            }
        }
    }
    

전체 C# 자습서 읽기: C#: Excel 문서에서 드롭다운 목록 만들기.

Java를 사용하여 Excel에 드롭다운 목록 삽입

Java용 Spire.XLS를 사용하여 Excel에 드롭다운 목록을 추가하려면 다음 단계를 참조하십시오.

  1. 공식 웹사이트에서 Java용 Spire.XLS를 다운로드하거나 다음 구성을 사용하여 Maven 리포지토리에서 설치하십시오.

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.xls</artifactId>
            <version>16.4.1</version>
        </dependency>
    </dependencies>
    
  2. 다음 코드를 추가하여 Java의 Excel 파일에 드롭다운 목록을 삽입합니다.

    import com.spire.xls.*;
    
    public class AddDropdownList {
        public static void main(String[] args) {
            // Load the existing Excel file
            Workbook workbook = new Workbook();
            workbook.loadFromFile("Employee_Info.xlsx");
    
            // Get the first worksheet
            Worksheet sheet = workbook.getWorksheets().get(0);
    
            // Define dropdown list items
            String[] items = new String[] { "Pending", "In Progress", "Completed" };
    
            // Apply data validation to range C2:C6
            CellRange range = sheet.getRange().get("C2:C6");
            range.getDataValidation().setValues(items);
    
            // Save the modified workbook
            workbook.saveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
            // Dispose resources
            workbook.dispose();
        }
    }
    

전체 Java 자습서 읽기: Java: Excel에서 드롭다운 목록 만들기.

Python을 사용하여 Excel 드롭다운 목록 만들기

다음은 Python용 Spire.XLS를 사용하여 Excel 드롭다운 목록을 만드는 방법입니다.

  1. Python용 Spire.XLS를 다운로드하거나 pip 명령을 사용하여 PyPI에서 설치하십시오.

    pip install spire.xls
    
  2. 다음 코드를 사용하여 Python의 Excel 파일에 드롭다운 목록을 만듭니다.

    from spire.xls import *
    
    # Load the existing Excel file
    workbook = Workbook()
    workbook.LoadFromFile("Employee_Info.xlsx")
    
    # Get the first worksheet
    worksheet = workbook.Worksheets[0]
    
    # Define dropdown list items
    values = ["Pending", "In Progress", "Completed"]
    
    # Apply data validation to the range C2:C6
    range = worksheet.Range["C2:C6"]
    range.DataValidation.Values = values
    
    # Save the modified workbook
    workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016)
    
    # Dispose of resources
    workbook.Dispose()
    

전체 Python 자습서 읽기: Python: Excel 워크시트에서 드롭다운 목록 만들기.

결론

Excel에서 드롭다운 목록을 만드는 것은 데이터 입력을 표준화하고 오류를 최소화하는 간단하면서도 강력한 방법입니다. 일반 사용자의 경우 Excel의 데이터 유효성 검사 기능은 드롭다운을 추가하는 쉬운 수동 접근 방식을 제공합니다. 여러 Excel 파일을 처리하는 개발자 및 팀의 경우 C#, Java 또는 Python에서 Spire.XLS를 사용하면 드롭다운 목록을 프로그래밍 방식으로 생성하고 반복적인 작업을 자동화하며 데이터 일관성을 보장할 수 있습니다. 이러한 기술을 활용하여 Excel 사용자는 생산성을 향상시키고 데이터 무결성을 높이며 데이터 분석을 더 원활하게 만들 수 있습니다.

자주 묻는 질문: Excel 드롭다운 목록 만들기

Q1: 드롭다운 목록을 만든 후 편집할 수 있습니까?

A1: 예. Excel에서 수동으로 데이터 유효성 검사 설정을 수정하거나 C#, Java 또는 Python에서 Spire.XLS를 사용하여 프로그래밍 방식으로 목록 항목을 업데이트할 수 있습니다.

Q2: 드롭다운 목록이 다른 워크시트의 범위를 참조할 수 있습니까?

A2: 예. 데이터 유효성 검사 설정에서 다른 워크시트의 범위를 드롭다운 목록의 원본으로 선택할 수 있습니다.

Q3: 사용자가 드롭다운 목록에 없는 값을 입력할 수 있습니까?*

A3: 예. Excel의 데이터 유효성 검사 설정에서 "잘못된 데이터가 입력된 후 오류 경고 표시"를 선택 취소하여 사용자 지정 항목을 허용합니다.

Q4: 프로그래밍 방식 드롭다운 목록은 모든 Excel 버전과 호환됩니까?

A4: 예. Spire.XLS는 .xlsx, .xls 및 .xlsm을 포함한 대부분의 최신 Excel 형식을 지원합니다.

Q5: 원본 데이터가 변경될 때 자동으로 업데이트되는 동적 드롭다운 목록을 만드는 방법은 무엇입니까?

A5: 원본 목록에 명명된 범위 또는 Excel 테이블을 사용합니다. 테이블 또는 범위가 업데이트되면 드롭다운 목록에 변경 사항이 자동으로 반영됩니다.

Q6: 기존 데이터를 삭제하지 않고 드롭다운 목록을 제거하거나 지우는 방법은 무엇입니까?

A6: 데이터 유효성 검사로 이동한 다음 모두 지우기를 선택합니다. 이렇게 하면 드롭다운은 제거되지만 셀 값은 그대로 유지됩니다.

참고 항목

Créer une liste déroulante dans Excel - Guide étape par étape

La création d'une liste déroulante dans Excel est un moyen simple de simplifier la saisie de données et de réduire les erreurs. Lorsque les utilisateurs saisissent des informations manuellement, des incohérences dans l'orthographe ou le formatage peuvent rendre les données plus difficiles à filtrer ou à analyser. Une liste déroulante résout ce problème en permettant aux utilisateurs de choisir parmi des options prédéfinies, garantissant ainsi la cohérence et gagnant du temps.

Dans ce guide, vous apprendrez à créer efficacement une liste déroulante dans Excel. Nous aborderons les méthodes manuelles utilisant les fonctionnalités intégrées d'Excel et les méthodes programmatiques utilisant C#, Java et Python.

Créer des listes déroulantes dans Excel manuellement

La création manuelle d'une liste déroulante est simple et idéale pour les petits ensembles de données ou les formulaires uniques. Pour créer manuellement une liste déroulante, vous pouvez utiliser la fonction de validation des données dans Excel. Suivez les étapes ci-dessous :

  1. Ouvrez votre fichier Excel et sélectionnez la cellule ou la plage où vous souhaitez que la liste déroulante apparaisse, comme la cellule C2:C6 pour l'état de la tâche.

    Créer une liste déroulante dans Excel - Sélectionner des cellules ou une plage pour la liste déroulante

  2. Allez dans l'onglet Données du ruban Excel, cliquez sur Validation des données, puis sur Validation des données…, et la boîte de dialogue suivante s'ouvrira pour vous permettre de configurer la liste déroulante.

    Créer une liste déroulante dans Excel - Ouvrir la boîte de dialogue de validation des données

  3. Dans l'onglet Options de la boîte de dialogue, sélectionnez Liste dans le menu déroulant Autoriser. Dans la zone Source, vous pouvez soit taper les éléments de la liste directement, séparés par des virgules (par exemple : En attente, En cours, Terminé), soit sélectionner une plage de cellules (par exemple, J1:J3) dans votre feuille de calcul qui contient ces valeurs. Si vous utilisez une plage de cellules, la liste déroulante se mettra à jour automatiquement chaque fois que les données source changeront.

    Créer une liste déroulante dans Excel - Configurer la source de la liste

  4. Vous pouvez également configurer des options pour ignorer les cellules vides, afficher la flèche déroulante, afficher un message de saisie ou définir une alerte d'erreur pour les entrées non valides.

    Créer une liste déroulante dans Excel - Configurer les paramètres optionnels pour la liste

  5. Cliquez sur OK pour appliquer la liste déroulante. Les cellules sélectionnées afficheront désormais une flèche déroulante, vous permettant de choisir dans la liste prédéfinie. Vous pouvez copier la liste déroulante dans d'autres cellules ou utiliser des plages nommées pour gérer facilement des ensembles de données plus importants.

    Créer une liste déroulante dans Excel - Appliquer la liste déroulante et afficher le résultat

Créer une liste déroulante dans Excel par programmation à l'aide de code : Guide du développeur

Pour les développeurs qui ont besoin d'automatisation, la création de listes déroulantes par programmation est plus efficace. Spire.XLS est une puissante bibliothèque Excel qui permet aux développeurs de manipuler des fichiers Excel entièrement par le code, sans nécessiter l'installation de Microsoft Excel.

Il prend en charge un large éventail d'opérations telles que la création de feuilles de calcul, la mise en forme de cellules, la création de tableaux et l'ajout de listes déroulantes. En utilisant Spire.XLS, les développeurs peuvent automatiser la validation des données Excel, garantir la cohérence entre plusieurs fichiers et rationaliser les tâches répétitives.

Créer une liste déroulante dans Excel en utilisant C#

Pour insérer une liste déroulante dans Excel en utilisant C# avec Spire.XLS for .NET, suivez ces étapes :

  1. Téléchargez Spire.XLS for .NET depuis le site officiel ou installez-le directement via NuGet en utilisant le code suivant :

    PM> Install-Package Spire.XLS
    
  2. Utilisez le code suivant pour ajouter une liste déroulante à un fichier Excel en C#.

    using Spire.Xls;
    
    namespace AddDropdownList
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                // Load the existing Excel file
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("Employee_Info.xlsx");
    
                // Get the first worksheet
                Worksheet worksheet = workbook.Worksheets[0];
    
                // Define dropdown list items
                string[] statusList = new string[] { "Pending", "In Progress", "Completed" };
    
                // Apply data validation to the range C2:C6
                CellRange range = worksheet.Range["C2:C6"];
                range.DataValidation.Values = statusList;
    
                // Save the modified file
                workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
                // Release resources
                workbook.Dispose();
            }
        }
    }
    

Lisez le tutoriel C# complet : C# : Créer des listes déroulantes dans un document Excel.

Insérer une liste déroulante dans Excel en utilisant Java

Veuillez suivre les étapes suivantes pour ajouter une liste déroulante à Excel en utilisant Spire.XLS for Java :

  1. Téléchargez Spire.XLS for Java depuis le site officiel ou installez-le depuis le référentiel Maven en utilisant les configurations suivantes :

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.xls</artifactId>
            <version>16.4.1</version>
        </dependency>
    </dependencies>
    
  2. Ajoutez le code suivant pour insérer une liste déroulante dans un fichier Excel en Java.

    import com.spire.xls.*;
    
    public class AddDropdownList {
        public static void main(String[] args) {
            // Load the existing Excel file
            Workbook workbook = new Workbook();
            workbook.loadFromFile("Employee_Info.xlsx");
    
            // Get the first worksheet
            Worksheet sheet = workbook.getWorksheets().get(0);
    
            // Define dropdown list items
            String[] items = new String[] { "Pending", "In Progress", "Completed" };
    
            // Apply data validation to range C2:C6
            CellRange range = sheet.getRange().get("C2:C6");
            range.getDataValidation().setValues(items);
    
            // Save the modified workbook
            workbook.saveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
            // Dispose resources
            workbook.dispose();
        }
    }
    

Lisez le tutoriel Java complet : Java : Créer une liste déroulante dans Excel.

Créer une liste déroulante Excel en utilisant Python

Voici comment créer une liste déroulante Excel en utilisant Spire.XLS for Python :

  1. Téléchargez Spire.XLS for Python ou installez-le depuis PyPI en utilisant la commande pip :

    pip install spire.xls
    
  2. Utilisez le code suivant pour créer une liste déroulante dans un fichier Excel en Python.

    from spire.xls import *
    
    # Load the existing Excel file
    workbook = Workbook()
    workbook.LoadFromFile("Employee_Info.xlsx")
    
    # Get the first worksheet
    worksheet = workbook.Worksheets[0]
    
    # Define dropdown list items
    values = ["Pending", "In Progress", "Completed"]
    
    # Apply data validation to the range C2:C6
    range = worksheet.Range["C2:C6"]
    range.DataValidation.Values = values
    
    # Save the modified workbook
    workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016)
    
    # Dispose of resources
    workbook.Dispose()
    

Lisez le tutoriel Python complet : Python : Créer des listes déroulantes dans les feuilles de calcul Excel.

Conclusion

La création de listes déroulantes dans Excel est un moyen simple mais puissant de normaliser la saisie de données et de minimiser les erreurs. Pour les utilisateurs occasionnels, la fonction de validation des données d'Excel offre une approche manuelle simple pour ajouter des listes déroulantes. Pour les développeurs et les équipes qui gèrent plusieurs fichiers Excel, l'utilisation de Spire.XLS en C#, Java ou Python permet la création programmatique de listes déroulantes, automatise les tâches répétitives et garantit la cohérence des données. En tirant parti de ces techniques, les utilisateurs d'Excel peuvent améliorer leur productivité, renforcer l'intégrité des données et faciliter l'analyse des données.

FAQ : Créer une liste déroulante Excel

Q1 : Puis-je modifier une liste déroulante après l'avoir créée ?

R1 : Oui. Vous pouvez modifier manuellement les paramètres de validation des données dans Excel ou mettre à jour les éléments de la liste par programmation en utilisant Spire.XLS en C#, Java ou Python.

Q2 : Les listes déroulantes peuvent-elles faire référence à une plage dans une autre feuille de calcul ?

R2 : Oui. Dans les paramètres de validation des données, vous pouvez sélectionner une plage d'une autre feuille de calcul comme source pour votre liste déroulante.

Q3 : Les utilisateurs peuvent-ils saisir des valeurs qui ne figurent pas dans la liste déroulante ?*

R3 : Oui. Dans Excel, décochez "Afficher une alerte d'erreur après la saisie de données non valides" dans les paramètres de validation des données pour autoriser les entrées personnalisées.

Q4 : Les listes déroulantes programmatiques sont-elles compatibles avec toutes les versions d'Excel ?

R4 : Oui. Spire.XLS prend en charge la plupart des formats Excel modernes, y compris .xlsx, .xls et .xlsm.

Q5 : Comment créer des listes déroulantes dynamiques qui se mettent à jour automatiquement lorsque les données source changent ?

R5 : Utilisez une plage nommée ou un tableau Excel pour la liste source. Lorsque le tableau ou la plage est mis à jour, la liste déroulante reflète automatiquement les modifications.

Q6 : Comment supprimer ou effacer une liste déroulante sans supprimer les données existantes ?

R6 : Allez dans Validation des données, puis Effacer tout. Cela supprime la liste déroulante mais conserve les valeurs des cellules intactes.

Voir aussi

Crear Lista Desplegable en Excel - Guía Paso a Paso

Crear una lista desplegable en Excel es una forma fácil de simplificar la entrada de datos y reducir errores. Cuando los usuarios escriben información manualmente, las inconsistencias en la ortografía o el formato pueden dificultar el filtrado o análisis de los datos. Una lista desplegable resuelve este problema al permitir que los usuarios elijan entre opciones predefinidas, asegurando la consistencia y ahorrando tiempo.

En esta guía, aprenderá cómo crear una lista desplegable en Excel de manera eficiente. Cubriremos métodos manuales utilizando las características integradas de Excel y métodos programáticos utilizando C#, Java y Python.

Crear Listas Desplegables en Excel Manualmente

Crear una lista desplegable manualmente es sencillo e ideal para conjuntos de datos pequeños o formularios únicos. Para crear manualmente una lista desplegable, puede usar la función de Validación de Datos en Excel. Siga los pasos a continuación:

  1. Abra su archivo de Excel y seleccione la celda o el rango donde desea que aparezca la lista desplegable, como la celda C2:C6 para el estado de la tarea.

    Crear lista desplegable en Excel - Seleccionar Celdas o Rango para Desplegable

  2. Vaya a la pestaña Datos en la cinta de opciones de Excel, haga clic en Validación de Datos, luego en Validación de Datos…, y se abrirá el siguiente cuadro de diálogo para permitirle configurar la lista desplegable.

    Crear lista desplegable en Excel - Abrir Diálogo de Validación de Datos

  3. En la pestaña Configuración del cuadro de diálogo, seleccione Lista en el menú desplegable Permitir. En el cuadro Origen, puede escribir los elementos de la lista directamente, separados por comas (por ejemplo: Pendiente, En Progreso, Completado), o seleccionar un rango de celdas (p. ej., J1:J3) en su hoja de cálculo que contenga estos valores. Si utiliza un rango de celdas, la lista desplegable se actualizará automáticamente cada vez que cambien los datos de origen.

    Crear lista desplegable en Excel - Configurar Origen de la Lista

  4. También puede configurar opciones para ignorar celdas en blanco, mostrar la flecha desplegable, mostrar un mensaje de entrada o establecer una alerta de error para entradas no válidas.

    Crear lista desplegable en Excel - Configurar Ajustes Opcionales para la lista

  5. Haga clic en Aceptar para aplicar la lista desplegable. Las celdas seleccionadas ahora mostrarán una flecha desplegable, lo que le permitirá elegir de la lista predefinida. Puede copiar la lista desplegable a otras celdas o usar rangos con nombre para administrar conjuntos de datos más grandes fácilmente.

    Crear lista desplegable en Excel - Aplicar el Desplegable y Ver el Resultado

Crear Lista Desplegable en Excel Programáticamente Usando Código: Guía para Desarrolladores

Para los desarrolladores que necesitan automatización, crear listas desplegables mediante programación es más eficiente. Spire.XLS es una potente biblioteca de Excel que permite a los desarrolladores manipular archivos de Excel completamente a través de código, sin necesidad de tener instalado Microsoft Excel.

Admite una amplia gama de operaciones como la creación de hojas de cálculo, el formato de celdas, la creación de tablas y la adición de listas desplegables. Usando Spire.XLS, los desarrolladores pueden automatizar la validación de datos de Excel, garantizar la coherencia en múltiples archivos y agilizar las tareas repetitivas.

Crear una Lista Desplegable en Excel usando C#

Para insertar una lista desplegable en Excel usando C# con Spire.XLS for .NET, siga estos pasos:

  1. Descargue Spire.XLS for .NET desde el sitio web oficial o instálelo directamente a través de NuGet usando el siguiente código:

    PM> Install-Package Spire.XLS
    
  2. Use el siguiente código para agregar una lista desplegable a un archivo de Excel en C#.

    using Spire.Xls;
    
    namespace AddDropdownList
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                // Load the existing Excel file
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("Employee_Info.xlsx");
    
                // Get the first worksheet
                Worksheet worksheet = workbook.Worksheets[0];
    
                // Define dropdown list items
                string[] statusList = new string[] { "Pending", "In Progress", "Completed" };
    
                // Apply data validation to the range C2:C6
                CellRange range = worksheet.Range["C2:C6"];
                range.DataValidation.Values = statusList;
    
                // Save the modified file
                workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
                // Release resources
                workbook.Dispose();
            }
        }
    }
    

Lea el tutorial completo de C#: C#: Crear Listas Desplegables en un Documento de Excel.

Insertar una Lista Desplegable en Excel usando Java

Consulte los siguientes pasos para agregar una lista desplegable a Excel usando Spire.XLS para Java:

  1. Descargue Spire.XLS para Java desde el sitio web oficial o instálelo desde el Repositorio de Maven usando las siguientes configuraciones:

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.xls</artifactId>
            <version>16.4.1</version>
        </dependency>
    </dependencies>
    
  2. Agregue el siguiente código para insertar una lista desplegable en un archivo de Excel en Java.

    import com.spire.xls.*;
    
    public class AddDropdownList {
        public static void main(String[] args) {
            // Load the existing Excel file
            Workbook workbook = new Workbook();
            workbook.loadFromFile("Employee_Info.xlsx");
    
            // Get the first worksheet
            Worksheet sheet = workbook.getWorksheets().get(0);
    
            // Define dropdown list items
            String[] items = new String[] { "Pending", "In Progress", "Completed" };
    
            // Apply data validation to range C2:C6
            CellRange range = sheet.getRange().get("C2:C6");
            range.getDataValidation().setValues(items);
    
            // Save the modified workbook
            workbook.saveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
            // Dispose resources
            workbook.dispose();
        }
    }
    

Lea el tutorial completo de Java: Java: Crear una Lista Desplegable en Excel.

Crear Lista Desplegable de Excel usando Python

A continuación se explica cómo crear una lista desplegable de Excel usando Spire.XLS para Python:

  1. Descargue Spire.XLS para Python o instálelo desde PyPI usando el comando pip:

    pip install spire.xls
    
  2. Use el siguiente código para crear una lista desplegable en un archivo de Excel en Python.

    from spire.xls import *
    
    # Load the existing Excel file
    workbook = Workbook()
    workbook.LoadFromFile("Employee_Info.xlsx")
    
    # Get the first worksheet
    worksheet = workbook.Worksheets[0]
    
    # Define dropdown list items
    values = ["Pending", "In Progress", "Completed"]
    
    # Apply data validation to the range C2:C6
    range = worksheet.Range["C2:C6"]
    range.DataValidation.Values = values
    
    # Save the modified workbook
    workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016)
    
    # Dispose of resources
    workbook.Dispose()
    

Lea el tutorial completo de Python: Python: Crear Listas Desplegables en Hojas de Cálculo de Excel.

Conclusión

Crear listas desplegables en Excel es una forma simple pero poderosa de estandarizar la entrada de datos y minimizar errores. Para los usuarios ocasionales, la función de Validación de Datos de Excel proporciona un enfoque manual y fácil para agregar listas desplegables. Para los desarrolladores y equipos que manejan múltiples archivos de Excel, usar Spire.XLS en C#, Java o Python permite la creación programática de listas desplegables, automatiza tareas repetitivas y garantiza la consistencia de los datos. Al aprovechar estas técnicas, los usuarios de Excel pueden mejorar la productividad, aumentar la integridad de los datos y facilitar el análisis de datos.

Preguntas Frecuentes: Crear Lista Desplegable de Excel

P1: ¿Puedo editar una lista desplegable después de crearla?

R1: Sí. Puede modificar la configuración de Validación de Datos manualmente en Excel o actualizar los elementos de la lista mediante programación utilizando Spire.XLS en C#, Java o Python.

P2: ¿Pueden las listas desplegables hacer referencia a un rango en otra hoja de cálculo?

R2: Sí. En la configuración de Validación de Datos, puede seleccionar un rango de otra hoja de cálculo como origen de su lista desplegable.

P3: ¿Pueden los usuarios ingresar valores que no están en la lista desplegable?*

R3: Sí. En Excel, desmarque "Mostrar alerta de error después de que se ingresen datos no válidos" en la configuración de Validación de Datos para permitir entradas personalizadas.

P4: ¿Son compatibles las listas desplegables programáticas con todas las versiones de Excel?

R4: Sí. Spire.XLS es compatible con la mayoría de los formatos modernos de Excel, incluidos .xlsx, .xls y .xlsm.

P5: ¿Cómo crear listas desplegables dinámicas que se actualicen automáticamente cuando cambien los datos de origen?

R5: Use un rango con nombre o una tabla de Excel para la lista de origen. Cuando la tabla o el rango se actualiza, la lista desplegable refleja los cambios automáticamente.

P6: ¿Cómo eliminar o borrar una lista desplegable sin eliminar los datos existentes?

R6: Vaya a Validación de Datos, luego Borrar Todo. Esto elimina la lista desplegable pero mantiene intactos los valores de la celda.

Ver También

Dropdown-Liste in Excel erstellen - Schritt-für-Schritt-Anleitung

Das Erstellen einer Dropdown-Liste in Excel ist eine einfache Möglichkeit, die Dateneingabe zu vereinfachen und Fehler zu reduzieren. Wenn Benutzer Informationen manuell eingeben, können Inkonsistenzen in der Rechtschreibung oder Formatierung die Filterung oder Analyse von Daten erschweren. Eine Dropdown-Liste löst dieses Problem, indem sie Benutzern die Auswahl aus vordefinierten Optionen ermöglicht, was die Konsistenz gewährleistet und Zeit spart.

In dieser Anleitung erfahren Sie, wie Sie effizient eine Dropdown-Liste in Excel erstellen. Wir werden manuelle Methoden mit den integrierten Funktionen von Excel und programmgesteuerte Methoden mit C#, Java und Python behandeln.

Dropdown-Listen in Excel manuell erstellen

Das manuelle Erstellen einer Dropdown-Liste ist unkompliziert und ideal für kleine Datensätze oder einmalige Formulare. Um eine Dropdown-Liste manuell zu erstellen, können Sie die Funktion Datenüberprüfung in Excel verwenden. Führen Sie die folgenden Schritte aus:

  1. Öffnen Sie Ihre Excel-Datei und wählen Sie die Zelle oder den Bereich aus, in dem die Dropdown-Liste erscheinen soll, z. B. die Zellen C2:C6 für den Aufgabenstatus.

    Dropdown-Liste in Excel erstellen - Zellen oder Bereich für Dropdown auswählen

  2. Gehen Sie zur Registerkarte Daten im Excel-Menüband, klicken Sie auf Datenüberprüfung und dann auf Datenüberprüfung…. Daraufhin öffnet sich das folgende Dialogfeld, in dem Sie die Dropdown-Liste konfigurieren können.

    Dropdown-Liste in Excel erstellen - Dialogfeld Datenüberprüfung öffnen

  3. Wählen Sie auf der Registerkarte Einstellungen des Dialogfelds im Dropdown-Menü Zulassen die Option Liste aus. Im Feld Quelle können Sie entweder die Listenelemente direkt eingeben, getrennt durch Kommas (zum Beispiel: Ausstehend, In Bearbeitung, Abgeschlossen), oder einen Zellbereich (z. B. J1:J3) in Ihrem Arbeitsblatt auswählen, der diese Werte enthält. Wenn Sie einen Zellbereich verwenden, wird die Dropdown-Liste automatisch aktualisiert, sobald sich die Quelldaten ändern.

    Dropdown-Liste in Excel erstellen - Listenquelle konfigurieren

  4. Sie können auch Optionen konfigurieren, um leere Zellen zu ignorieren, den Dropdown-Pfeil anzuzeigen, eine Eingabemeldung anzuzeigen oder eine Fehlermeldung für ungültige Eingaben festzulegen.

    Dropdown-Liste in Excel erstellen - Optionale Einstellungen für die Liste konfigurieren

  5. Klicken Sie auf OK, um die Dropdown-Liste zu übernehmen. Die ausgewählten Zellen zeigen nun einen Dropdown-Pfeil an, mit dem Sie aus der vordefinierten Liste auswählen können. Sie können die Dropdown-Liste in andere Zellen kopieren oder benannte Bereiche verwenden, um größere Datensätze einfach zu verwalten.

    Dropdown-Liste in Excel erstellen - Dropdown anwenden und die Ausgabe anzeigen

Dropdown-Liste in Excel programmgesteuert mit Code erstellen: Entwicklerhandbuch

Für Entwickler, die Automatisierung benötigen, ist das programmgesteuerte Erstellen von Dropdown-Listen effizienter. Spire.XLS ist eine leistungsstarke Excel-Bibliothek, die es Entwicklern ermöglicht, Excel-Dateien vollständig per Code zu bearbeiten, ohne dass Microsoft Excel installiert sein muss.

Es unterstützt eine Vielzahl von Operationen wie das Erstellen von Arbeitsblättern, das Formatieren von Zellen, das Erstellen von Tabellen und das Hinzufügen von Dropdown-Listen. Mit Spire.XLS können Entwickler die Excel-Datenüberprüfung automatisieren, die Konsistenz über mehrere Dateien hinweg sicherstellen und sich wiederholende Aufgaben rationalisieren.

Eine Dropdown-Liste in Excel mit C# erstellen

Um eine Dropdown-Liste in Excel mit C# und Spire.XLS for .NET einzufügen, führen Sie die folgenden Schritte aus:

  1. Laden Sie Spire.XLS for .NET von der offiziellen Website herunter oder installieren Sie es direkt über NuGet mit dem folgenden Code:

    PM> Install-Package Spire.XLS
    
  2. Verwenden Sie den folgenden Code, um eine Dropdown-Liste zu einer Excel-Datei in C# hinzuzufügen.

    using Spire.Xls;
    
    namespace AddDropdownList
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                // Die vorhandene Excel-Datei laden
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("Employee_Info.xlsx");
    
                // Das erste Arbeitsblatt abrufen
                Worksheet worksheet = workbook.Worksheets[0];
    
                // Elemente der Dropdown-Liste definieren
                string[] statusList = new string[] { "Pending", "In Progress", "Completed" };
    
                // Datenüberprüfung auf den Bereich C2:C6 anwenden
                CellRange range = worksheet.Range["C2:C6"];
                range.DataValidation.Values = statusList;
    
                // Die geänderte Datei speichern
                workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
                // Ressourcen freigeben
                workbook.Dispose();
            }
        }
    }
    

Lesen Sie das vollständige C#-Tutorial: C#: Dropdown-Listen in einem Excel-Dokument erstellen.

Eine Dropdown-Liste in Excel mit Java einfügen

Bitte beachten Sie die folgenden Schritte, um eine Dropdown-Liste mit Spire.XLS for Java zu Excel hinzuzufügen:

  1. Laden Sie Spire.XLS for Java von der offiziellen Website herunter oder installieren Sie es aus dem Maven-Repository mit den folgenden Konfigurationen:

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.xls</artifactId>
            <version>16.4.1</version>
        </dependency>
    </dependencies>
    
  2. Fügen Sie den folgenden Code hinzu, um eine Dropdown-Liste in eine Excel-Datei in Java einzufügen.

    import com.spire.xls.*;
    
    public class AddDropdownList {
        public static void main(String[] args) {
            // Die vorhandene Excel-Datei laden
            Workbook workbook = new Workbook();
            workbook.loadFromFile("Employee_Info.xlsx");
    
            // Das erste Arbeitsblatt abrufen
            Worksheet sheet = workbook.getWorksheets().get(0);
    
            // Elemente der Dropdown-Liste definieren
            String[] items = new String[] { "Pending", "In Progress", "Completed" };
    
            // Datenüberprüfung auf den Bereich C2:C6 anwenden
            CellRange range = sheet.getRange().get("C2:C6");
            range.getDataValidation().setValues(items);
    
            // Die geänderte Arbeitsmappe speichern
            workbook.saveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
            // Ressourcen freigeben
            workbook.dispose();
        }
    }
    

Lesen Sie das vollständige Java-Tutorial: Java: Eine Dropdown-Liste in Excel erstellen.

Excel-Dropdown-Liste mit Python erstellen

So erstellen Sie eine Excel-Dropdown-Liste mit Spire.XLS for Python:

  1. Laden Sie Spire.XLS for Python herunter oder installieren Sie es von PyPI mit dem pip-Befehl:

    pip install spire.xls
    
  2. Verwenden Sie den folgenden Code, um eine Dropdown-Liste in einer Excel-Datei in Python zu erstellen.

    from spire.xls import *
    
    # Die vorhandene Excel-Datei laden
    workbook = Workbook()
    workbook.LoadFromFile("Employee_Info.xlsx")
    
    # Das erste Arbeitsblatt abrufen
    worksheet = workbook.Worksheets[0]
    
    # Elemente der Dropdown-Liste definieren
    values = ["Pending", "In Progress", "Completed"]
    
    # Datenüberprüfung auf den Bereich C2:C6 anwenden
    range = worksheet.Range["C2:C6"]
    range.DataValidation.Values = values
    
    # Die geänderte Arbeitsmappe speichern
    workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016)
    
    # Ressourcen freigeben
    workbook.Dispose()
    

Lesen Sie das vollständige Python-Tutorial: Python: Dropdown-Listen in Excel-Arbeitsblättern erstellen.

Fazit

Das Erstellen von Dropdown-Listen in Excel ist eine einfache, aber leistungsstarke Methode, um die Dateneingabe zu standardisieren und Fehler zu minimieren. Für Gelegenheitsanwender bietet die Datenüberprüfungsfunktion von Excel einen einfachen, manuellen Ansatz zum Hinzufügen von Dropdowns. Für Entwickler und Teams, die mehrere Excel-Dateien verwalten, ermöglicht die Verwendung von Spire.XLS in C#, Java oder Python die programmgesteuerte Erstellung von Dropdown-Listen, automatisiert sich wiederholende Aufgaben und gewährleistet die Datenkonsistenz. Durch die Nutzung dieser Techniken können Excel-Benutzer die Produktivität verbessern, die Datenintegrität erhöhen und die Datenanalyse reibungsloser gestalten.

FAQs: Excel-Dropdown-Liste erstellen

F1: Kann ich eine Dropdown-Liste nach ihrer Erstellung bearbeiten?

A1: Ja. Sie können die Datenüberprüfungseinstellungen manuell in Excel ändern oder die Listenelemente programmgesteuert mit Spire.XLS in C#, Java oder Python aktualisieren.

F2: Können Dropdown-Listen auf einen Bereich in einem anderen Arbeitsblatt verweisen?

A2: Ja. In den Datenüberprüfungseinstellungen können Sie einen Bereich aus einem anderen Arbeitsblatt als Quelle für Ihre Dropdown-Liste auswählen.

F3: Können Benutzer Werte eingeben, die nicht in der Dropdown-Liste enthalten sind?*

A3: Ja. Deaktivieren Sie in Excel in den Datenüberprüfungseinstellungen die Option "Fehlermeldung anzeigen, nachdem ungültige Daten eingegeben wurden", um benutzerdefinierte Eingaben zuzulassen.

F4: Sind programmgesteuerte Dropdown-Listen mit allen Excel-Versionen kompatibel?

A4: Ja. Spire.XLS unterstützt die meisten modernen Excel-Formate, einschließlich .xlsx, .xls und .xlsm.

F5: Wie erstellt man dynamische Dropdown-Listen, die sich automatisch aktualisieren, wenn sich die Quelldaten ändern?

A5: Verwenden Sie einen benannten Bereich oder eine Excel-Tabelle für die Quellliste. Wenn sich die Tabelle oder der Bereich aktualisiert, spiegelt die Dropdown-Liste die Änderungen automatisch wider.

F6: Wie entfernt oder löscht man eine Dropdown-Liste, ohne vorhandene Daten zu löschen?

A6: Gehen Sie zu Datenüberprüfung und dann zu Alle löschen. Dadurch wird die Dropdown-Liste entfernt, die Zellwerte bleiben jedoch erhalten.

Siehe auch

Создание выпадающего списка в Excel - Пошаговое руководство

Создание выпадающего списка в Excel — это простой способ упростить ввод данных и уменьшить количество ошибок. Когда пользователи вводят информацию вручную, несоответствия в написании или форматировании могут затруднить фильтрацию или анализ данных. Выпадающий список решает эту проблему, позволяя пользователям выбирать из предопределенных вариантов, обеспечивая согласованность и экономя время.

В этом руководстве вы узнаете, как эффективно создавать выпадающие списки в Excel. Мы рассмотрим ручные методы с использованием встроенных функций Excel и программные методы с использованием C#, Java и Python.

Создание выпадающих списков в Excel вручную

Создание выпадающего списка вручную — это простой процесс, идеально подходящий для небольших наборов данных или одноразовых форм. Чтобы создать выпадающий список вручную, вы можете использовать функцию "Проверка данных" в Excel. Следуйте приведенным ниже шагам:

  1. Откройте ваш файл Excel и выберите ячейку или диапазон, где вы хотите разместить выпадающий список, например, ячейки C2:C6 для статуса задачи.

    Создание выпадающего списка в Excel - Выбор ячеек или диапазона для выпадающего списка

  2. Перейдите на вкладку "Данные" на ленте Excel, нажмите "Проверка данных", затем "Проверка данных…", и откроется следующее диалоговое окно, позволяющее настроить выпадающий список.

    Создание выпадающего списка в Excel - Открытие диалогового окна 'Проверка данных'

  3. На вкладке "Параметры" диалогового окна выберите "Список" из выпадающего меню "Тип данных". В поле "Источник" вы можете либо ввести элементы списка напрямую, разделяя их запятыми (например: Ожидание, В процессе, Завершено), либо выбрать диапазон ячеек (например, J1:J3) на вашем листе, который содержит эти значения. Если вы используете диапазон ячеек, выпадающий список будет автоматически обновляться при изменении исходных данных.

    Создание выпадающего списка в Excel - Настройка источника списка

  4. Вы также можете настроить параметры, чтобы игнорировать пустые ячейки, показывать стрелку выпадающего списка, отображать сообщение для ввода или устанавливать оповещение об ошибке для неверных записей.

    Создание выпадающего списка в Excel - Настройка дополнительных параметров для списка

  5. Нажмите "OK", чтобы применить выпадающий список. В выбранных ячейках теперь появится стрелка выпадающего списка, позволяющая выбирать из предопределенного списка. Вы можете скопировать выпадающий список в другие ячейки или использовать именованные диапазоны для удобного управления большими наборами данных.

    Создание выпадающего списка в Excel - Применение выпадающего списка и просмотр результата

Создание выпадающего списка в Excel программно с использованием кода: Руководство для разработчиков

Для разработчиков, которым нужна автоматизация, программное создание выпадающих списков является более эффективным. Spire.XLS — это мощная библиотека для работы с Excel, которая позволяет разработчикам полностью управлять файлами Excel с помощью кода, не требуя установки Microsoft Excel.

Она поддерживает широкий спектр операций, таких как создание листов, форматирование ячеек, создание таблиц и добавление выпадающих списков. Используя Spire.XLS, разработчики могут автоматизировать проверку данных в Excel, обеспечивать согласованность между несколькими файлами и оптимизировать повторяющиеся задачи.

Создание выпадающего списка в Excel с использованием C#

Чтобы вставить выпадающий список в Excel с помощью C# и Spire.XLS for .NET, выполните следующие шаги:

  1. Скачайте Spire.XLS for .NET с официального сайта или установите его напрямую через NuGet, используя следующий код:

    PM> Install-Package Spire.XLS
    
  2. Используйте следующий код, чтобы добавить выпадающий список в файл Excel на C#.

    using Spire.Xls;
    
    namespace AddDropdownList
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                // Load the existing Excel file
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("Employee_Info.xlsx");
    
                // Get the first worksheet
                Worksheet worksheet = workbook.Worksheets[0];
    
                // Define dropdown list items
                string[] statusList = new string[] { "Pending", "In Progress", "Completed" };
    
                // Apply data validation to the range C2:C6
                CellRange range = worksheet.Range["C2:C6"];
                range.DataValidation.Values = statusList;
    
                // Save the modified file
                workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
                // Release resources
                workbook.Dispose();
            }
        }
    }
    

Прочитайте полное руководство по C#: C#: Создание выпадающих списков в документе Excel.

Вставка выпадающего списка в Excel с использованием Java

Пожалуйста, следуйте этим шагам, чтобы добавить выпадающий список в Excel с помощью Spire.XLS for Java:

  1. Скачайте Spire.XLS for Java с официального сайта или установите его из репозитория Maven, используя следующие конфигурации:

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.xls</artifactId>
            <version>16.4.1</version>
        </dependency>
    </dependencies>
    
  2. Добавьте следующий код, чтобы вставить выпадающий список в файл Excel на Java.

    import com.spire.xls.*;
    
    public class AddDropdownList {
        public static void main(String[] args) {
            // Load the existing Excel file
            Workbook workbook = new Workbook();
            workbook.loadFromFile("Employee_Info.xlsx");
    
            // Get the first worksheet
            Worksheet sheet = workbook.getWorksheets().get(0);
    
            // Define dropdown list items
            String[] items = new String[] { "Pending", "In Progress", "Completed" };
    
            // Apply data validation to range C2:C6
            CellRange range = sheet.getRange().get("C2:C6");
            range.getDataValidation().setValues(items);
    
            // Save the modified workbook
            workbook.saveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
            // Dispose resources
            workbook.dispose();
        }
    }
    

Прочитайте полное руководство по Java: Java: Создание выпадающего списка в Excel.

Создание выпадающего списка Excel с использованием Python

Вот как создать выпадающий список в Excel с помощью Spire.XLS for Python:

  1. Скачайте Spire.XLS for Python или установите его из PyPI с помощью команды pip:

    pip install spire.xls
    
  2. Используйте следующий код, чтобы создать выпадающий список в файле Excel на Python.

    from spire.xls import *
    
    # Load the existing Excel file
    workbook = Workbook()
    workbook.LoadFromFile("Employee_Info.xlsx")
    
    # Get the first worksheet
    worksheet = workbook.Worksheets[0]
    
    # Define dropdown list items
    values = ["Pending", "In Progress", "Completed"]
    
    # Apply data validation to the range C2:C6
    range = worksheet.Range["C2:C6"]
    range.DataValidation.Values = values
    
    # Save the modified workbook
    workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016)
    
    # Dispose of resources
    workbook.Dispose()
    

Прочитайте полное руководство по Python: Python: Создание выпадающих списков на листах Excel.

Заключение

Создание выпадающих списков в Excel — это простой, но мощный способ стандартизировать ввод данных и минимизировать ошибки. Для обычных пользователей функция "Проверка данных" в Excel предоставляет простой ручной способ добавления выпадающих списков. Для разработчиков и команд, работающих с несколькими файлами Excel, использование Spire.XLS на C#, Java или Python позволяет программно создавать выпадающие списки, автоматизировать повторяющиеся задачи и обеспечивать согласованность данных. Используя эти методы, пользователи Excel могут повысить производительность, улучшить целостность данных и упростить анализ данных.

Часто задаваемые вопросы: Создание выпадающего списка в Excel

В1: Могу ли я редактировать выпадающий список после его создания?

О1: Да. Вы можете изменить настройки "Проверки данных" вручную в Excel или обновить элементы списка программно с помощью Spire.XLS на C#, Java или Python.

В2: Могут ли выпадающие списки ссылаться на диапазон на другом листе?

О2: Да. В настройках "Проверки данных" вы можете выбрать диапазон с другого листа в качестве источника для вашего выпадающего списка.

В3: Могут ли пользователи вводить значения, которых нет в выпадающем списке?*

О3: Да. В Excel снимите флажок "Показывать оповещение об ошибке после ввода неверных данных" в настройках "Проверки данных", чтобы разрешить пользовательские записи.

В4: Совместимы ли программно созданные выпадающие списки со всеми версиями Excel?

О4: Да. Spire.XLS поддерживает большинство современных форматов Excel, включая .xlsx, .xls и .xlsm.

В5: Как создавать динамические выпадающие списки, которые автоматически обновляются при изменении исходных данных?

О5: Используйте именованный диапазон или таблицу Excel для исходного списка. Когда таблица или диапазон обновляются, выпадающий список автоматически отражает изменения.

В6: Как удалить или очистить выпадающий список, не удаляя существующие данные?

О6: Перейдите в "Проверку данных", затем "Очистить все". Это удалит выпадающий список, но сохранит значения в ячейках.

Смотрите также

Create Dropdown List in Excel - Step-by-Step Guide

Creating a dropdown list in Excel is an easy way to simplify data entry and reduce errors. When users type information manually, inconsistencies in spelling or formatting can make data harder to filter or analyze. A dropdown list solves this problem by letting users choose from predefined options, ensuring consistency and saving time.

In this guide, you will learn how to create dropdown list in Excel efficiently. We will cover manual methods using Excel's built-in features and programmatic methods using C#, Java, and Python.

Create Dropdown Lists in Excel Manually

Creating a dropdown list manually is straightforward and ideal for small datasets or one-off forms. To manually create a dropdown list, you can use the Data Validation feature in Excel. Follow the steps below:

  1. Open your Excel file and select the cell or range where you want the dropdown list to appear, such as cell C2:C6 for task status.

    Create Dropdown list in Excel - Select Cells or Range for Dropdown

  2. Go to the Data tab on the Excel ribbon, click Data Validation, then Data Validation…, and the following dialog box will open to let you configure the dropdown list.

    Create Dropdown list in Excel - Open Data Validation Dialog

  3. In the Settings tab of the dialog box, select List from the Allow dropdown. In the Source box, you can either type the list items directly, separated by commas (for example: Pending, In Progress, Completed), or select a range of cells (e.g., J1:J3) in your worksheet that contains these values. If you use a cell range, the dropdown list will update automatically whenever the source data changes.

    Create Dropdown list in Excel - Configure List Source

  4. You can also configure options to ignore blank cells, show the dropdown arrow, display an input message, or set an error alert for invalid entries.

    Create Dropdown list in Excel - Configure Optional Settings for the list

  5. Click OK to apply the dropdown. The selected cells will now show a dropdown arrow, allowing you to pick from the predefined list. You can copy the dropdown to other cells or use named ranges to manage larger datasets easily.

    Create Dropdown list in Excel - Apply the Dropdown and View the Output

Create Dropdown List in Excel Programmatically Using Code: Developer Guide

For developers who need automation, creating dropdown lists programmatically is more efficient. Spire.XLS is a powerful Excel library that enables developers to manipulate Excel files entirely through code, without requiring Microsoft Excel to be installed.

It supports a wide range of operations such as creating worksheets, formatting cells, creating tables, and adding dropdown lists. Using Spire.XLS, developers can automate Excel data validation, ensure consistency across multiple files, and streamline repetitive tasks.

Create a Dropdown List in Excel using C#

To insert a dropdown list in Excel using C# with Spire.XLS for .NET, follow these steps:

  1. Download Spire.XLS for .NET from the official website or install it directly through NuGet using the following code:

    PM> Install-Package Spire.XLS
    
  2. Use the following code to add a dropdown list to an Excel file in C#.

    using Spire.Xls;
    
    namespace AddDropdownList
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                // Load the existing Excel file
                Workbook workbook = new Workbook();
                workbook.LoadFromFile("Employee_Info.xlsx");
    
                // Get the first worksheet
                Worksheet worksheet = workbook.Worksheets[0];
    
                // Define dropdown list items
                string[] statusList = new string[] { "Pending", "In Progress", "Completed" };
    
                // Apply data validation to the range C2:C6
                CellRange range = worksheet.Range["C2:C6"];
                range.DataValidation.Values = statusList;
    
                // Save the modified file
                workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
                // Release resources
                workbook.Dispose();
            }
        }
    }
    

Read the full C# tutorial: C#: Create Dropdown Lists in an Excel Document.

Insert a Dropdown List in Excel using Java

Please refer to the following steps to add a dropdown list to Excel using Spire.XLS for Java:

  1. Download Spire.XLS for Java from the official website or install it from the Maven Repository using the following configurations:

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.xls</artifactId>
            <version>16.4.1</version>
        </dependency>
    </dependencies>
    
  2. Add the following code to insert a dropdown list into an Excel file in Java.

    import com.spire.xls.*;
    
    public class AddDropdownList {
        public static void main(String[] args) {
            // Load the existing Excel file
            Workbook workbook = new Workbook();
            workbook.loadFromFile("Employee_Info.xlsx");
    
            // Get the first worksheet
            Worksheet sheet = workbook.getWorksheets().get(0);
    
            // Define dropdown list items
            String[] items = new String[] { "Pending", "In Progress", "Completed" };
    
            // Apply data validation to range C2:C6
            CellRange range = sheet.getRange().get("C2:C6");
            range.getDataValidation().setValues(items);
    
            // Save the modified workbook
            workbook.saveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016);
    
            // Dispose resources
            workbook.dispose();
        }
    }
    

Read the full Java tutorial: Java: Create a Drop-Down List in Excel.

Create Excel Dropdown List using Python

Here is how to create Excel dropdown list using Spire.XLS for Python:

  1. Download Spire.XLS for Python or install it from PyPI using the pip command:

    pip install spire.xls
    
  2. Use the following code to create a dropdown list in an Excel file in Python.

    from spire.xls import *
    
    # Load the existing Excel file
    workbook = Workbook()
    workbook.LoadFromFile("Employee_Info.xlsx")
    
    # Get the first worksheet
    worksheet = workbook.Worksheets[0]
    
    # Define dropdown list items
    values = ["Pending", "In Progress", "Completed"]
    
    # Apply data validation to the range C2:C6
    range = worksheet.Range["C2:C6"]
    range.DataValidation.Values = values
    
    # Save the modified workbook
    workbook.SaveToFile("Employee_Info_Dropdown.xlsx", ExcelVersion.Version2016)
    
    # Dispose of resources
    workbook.Dispose()
    

Read the full Python tutorial: Python: Create Drop-Down Lists in Excel Worksheets.

Conclusion

Creating dropdown lists in Excel is a simple yet powerful way to standardize data entry and minimize errors. For casual users, Excel's Data Validation feature provides an easy, manual approach to add dropdowns. For developers and teams handling multiple Excel files, using Spire.XLS in C#, Java, or Python enables programmatic creation of dropdown lists, automates repetitive tasks, and ensures data consistency. By leveraging these techniques, Excel users can improve productivity, enhance data integrity, and make data analysis smoother.

FAQs: Create Excel Dropdown List

Q1: Can I edit a dropdown list after creating it?

A1: Yes. You can modify the Data Validation settings manually in Excel or update the list items programmatically using Spire.XLS in C#, Java, or Python.

Q2: Can dropdown lists reference a range in another worksheet?

A2: Yes. In the Data Validation settings, you can select a range from another worksheet as the source for your dropdown list.

Q3: Can users enter values not in the dropdown list?*

A3: Yes. In Excel, uncheck "Show error alert after invalid data is entered" in the Data Validation settings to allow custom entries.

Q4: Are programmatic dropdown lists compatible with all Excel versions?

A4: Yes. Spire.XLS supports most modern Excel formats, including .xlsx, .xls, and .xlsm.

Q5: How to create dynamic dropdown lists that update automatically when source data changes?

A5: Use a named range or Excel table for the source list. When the table or range updates, the dropdown list reflects changes automatically.

Q6: How to remove or clear a dropdown list without deleting existing data?

A6: Go to Data Validation, then Clear All. This removes the dropdown but keeps the cell values intact.

See Also

Java Generate PDFs from Templates

In many Java applications, you’ll need to generate PDF documents dynamically — for example, invoices, reports, or certificates. Creating PDFs from scratch can be time-consuming and error-prone, especially with complex layouts or changing content. Using templates with placeholders that are replaced at runtime is a more maintainable and flexible approach, ensuring consistent styling while separating layout from data.

In this article, we’ll explore how to generate PDFs from templates in Java using Spire.PDF for Java, including practical examples for both HTML and PDF templates. We’ll also highlight best practices, common challenges, and tips for creating professional, data-driven PDFs efficiently.

Table of Contents

Why Use Templates for PDF Generation

  • Maintainability : Designers or non-developers can edit templates (HTML, PDF, or Word) without touching code.
  • Separation of concerns : Your business logic is decoupled from document layout.
  • Consistency : Templates enforce consistent styling, branding, and layout across all generated documents.
  • Flexibility : You can switch or update templates without major code changes.

Choosing the Right Template Format (HTML, PDF, or Word)

Each template format has strengths and trade-offs. Understanding them helps you pick the best one for your use case.

Template Format Pros Cons / Considerations Ideal Use Cases
HTML Full control over layout via CSS, tables, responsive design; easy to iterate Needs an HTML-to-PDF conversion engine (e.g. Qt WebEngine, headless Chrome) Invoices, reports, documents with variable-length content, tables, images
PDF You can take an existing branded PDF and replace placeholders Only supports simple inline text replacements (no reflow for multiline content) Templates with fixed layout and limited dynamic fields (e.g. contracts, certificates)
Word (DOCX) Familiar to non-developers; supports rich editing Requires library (like Spire.Doc) to replace placeholders and convert to PDF Organizations with existing Word-based templates or documents maintained by non-technical staff

In practice, for documents with rich layout and dynamic content, HTML templates are often the best choice. For documents where layout must be rigid and placeholders are few, PDF templates can suffice. And if your stakeholders prefer Word-based templates, converting from Word to PDF may be the most comfortable workflow.

Setting Up the Environment

Before you begin coding, set up your project for Spire.PDF (and possibly Spire.Doc) usage:

  1. Download / add dependency
  2. To get started, download Spire.PDF for Java from our website and add the JAR files to your project's build path. If you’re using Maven, include the following dependency in your pom.xml.

    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.pdf</artifactId>
            <version>12.4.4</version>
        </dependency>
    </dependencies>
    
  3. (If using HTML templates) Install HTML-to-PDF engine / plugin

    Spire.PDF needs an external engine or plugin (e.g. Qt WebEngine or a headless Chrome /Chromium) to render HTML + CSS to PDF.

    • Download the appropriate plugin for your platform (Windows x86, Windows x64, Linux, macOS).
    • Unzip to a local folder and locate the plugins directory, e.g.: C:\plugins-windows-x64\plugins
    • Configure the plugin path in code:
  4. HtmlConverter.setPluginPath("C:\\plugins-windows-x64\\plugins");
    
  5. Prepare your templates
  • For HTML: define placeholders (e.g. {{PLACEHOLDER}}) in your template HTML / CSS.
  • For PDF: build or procure a base PDF that includes placeholder text (e.g. {PROJECT_NAME}) in the spots you want replaced.

Generating PDFs from Templates in Java

From an HTML Template

Here’s how you can use Spire.PDF to convert an HTML template into a PDF document, replacing placeholders with actual data.

Sample Code (HTML → PDF)

import com.spire.pdf.graphics.PdfMargins;
import com.spire.pdf.htmlconverter.LoadHtmlType;
import com.spire.pdf.htmlconverter.qt.HtmlConverter;
import com.spire.pdf.htmlconverter.qt.Size;

import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;

public class GeneratePdfFromHtmlTemplate {

    public static void main(String[] args) throws Exception {

        // Path to the HTML template file
        String htmlFilePath = "template/invoice_template.html";

        // Read HTML content from file
        String htmlTemplate = new String(Files.readAllBytes(Paths.get(htmlFilePath)));

        // Sample data for invoice
        Map invoiceData = new HashMap<>();
        invoiceData.put("INVOICE_NUMBER", "12345");
        invoiceData.put("INVOICE_DATE", "2025-08-25");
        invoiceData.put("BILLER_NAME", "John Doe");
        invoiceData.put("BILLER_ADDRESS", "123 Main St, Anytown, USA");
        invoiceData.put("BILLER_EMAIL", "johndoe@example.com");
        invoiceData.put("ITEM_DESCRIPTION", "Consulting Services");
        invoiceData.put("ITEM_QUANTITY", "10");
        invoiceData.put("ITEM_UNIT_PRICE", "$100");
        invoiceData.put("ITEM_TOTAL", "$1000");
        invoiceData.put("SUBTOTAL", "$1000");
        invoiceData.put("TAX_RATE", "5");
        invoiceData.put("TAX", "$50");
        invoiceData.put("TOTAL", "$1050");

        // Replace placeholders with actual values
        String populatedHtml = populateTemplate(htmlTemplate, invoiceData);

        // Output PDF file
        String outputFile = "output/Invoice.pdf";

        // Set the QT plugin path for HTML conversion
        HtmlConverter.setPluginPath("C:\\plugins-windows-x64\\plugins");

        // Convert HTML string to PDF
        HtmlConverter.convert(
                populatedHtml,
                outputFile,
                true,                       // Enable JavaScript
                100000,                     // Timeout (ms)
                new Size(595, 842),         // A4 size
                new PdfMargins(20),         // Margins
                LoadHtmlType.Source_Code    // Load HTML from string
        );

        System.out.println("PDF generated successfully: " + outputFile);
    }

    /**
     * Replace placeholders in HTML template with actual values.
     */
    private static String populateTemplate(String template, Map data) {
        String result = template;
        for (Map.Entry entry : data.entrySet()) {
            result = result.replace("{{" + entry.getKey() + "}}", entry.getValue());
        }
        return result;
    }
}

How it work:

  1. Design an HTML file using CSS, tables, images, etc., with placeholders (e.g. {{NAME}}).
  2. Store data values in a Map<String, String>.
  3. Replace placeholders with actual values at runtime.
  4. Use HtmlConverter.convert to generate a styled PDF.

This approach works well when your content may grow or shrink (tables, paragraphs), because HTML rendering handles flow and wrapping.

Output:

Generate PDF from HTML template in Java

From a PDF Template

If you already have a branded PDF template with placeholder text, you can open it and replace inline text within.

Sample Code (PDF placeholder replacement)

import com.spire.pdf.PdfDocument;
import com.spire.pdf.PdfPageBase;
import com.spire.pdf.texts.PdfTextReplaceOptions;
import com.spire.pdf.texts.PdfTextReplacer;
import com.spire.pdf.texts.ReplaceActionType;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

public class GeneratePdfFromPdfTemplate {

    public static void main(String[] args) {

        // Create a PdfDocument object
        PdfDocument doc = new PdfDocument();

        // Load a PDF file
        doc.loadFromFile("C:\\Users\\Administrator\\Desktop\\Template.pdf");

        // Create a PdfTextReplaceOptions object and specify the options
        PdfTextReplaceOptions textReplaceOptions = new PdfTextReplaceOptions();
        textReplaceOptions.setReplaceType(EnumSet.of(ReplaceActionType.WholeWord));

        // Get a specific page
        PdfPageBase page = doc.getPages().get(0);

        // Create a PdfTextReplacer object based on the page
        PdfTextReplacer textReplacer = new PdfTextReplacer(page);
        textReplacer.setOptions(textReplaceOptions);

        // Dictionary for old and new strings
        Map<String, String> replacements = new HashMap<>();
        replacements.put("{PROJECT_NAME}", "New Website Development");
        replacements.put("{PROJECT_NO}", "2023-001");
        replacements.put("{PROJECT MANAGER}", "Alice Johnson");
        replacements.put("{PERIOD}", "Q3 2023");
        replacements.put("{PERIOD}", "Q3 2023");
        replacements.put("{START_DATE}", "Jul 1, 2023");
        replacements.put("{END_DATE}", "Sep 30, 2023");

        // Loop through the dictionary to replace text
        for (Map.Entry<String, String> pair : replacements.entrySet()) {
            textReplacer.replaceText(pair.getKey(), pair.getValue());
        }

        // Save the document to a different PDF file
        doc.saveToFile("output/FromPdfTemplate.pdf");
        doc.dispose();
    }
}

How it works:

  1. Load an existing PDF template .
  2. Use PdfTextReplacer to find and replace placeholder text.
  3. Save the updated file as a new PDF.

This method works only for inline, simple text replacement . It does not reflow or adjust layout if the replacement text is longer or shorter.

Output:

Generate PDF files based on a PDF template

Best Practices for Template-Based PDF Generation

Here are some tips and guidelines to ensure reliability, maintainability, and quality of your generated PDFs:

  • Use HTML templates for rich content : If your document includes tables, variable-length sections, images, or requires responsive layouts, HTML templates offer more flexibility.
  • Use PDF templates for stable, fixed layouts : When your document layout is tightly controlled and only a few placeholders change, PDF templates can save you the effort of converting HTML.
  • Support Word templates if your team relies on them : If your design team uses Word, use Spire.Doc for Java to replace placeholders in DOCX and export to PDF.
  • Unique placeholder markers : Use distinct delimiters (e.g. {FIELD_NAME}, or {FIELD_DATE}) to avoid accidental partial replacements.
  • Keep templates external and versioned : Don’t embed template strings in code. Store them in resource files or external directories.
  • Test with real data sets : Use realistic data to validate layout — e.g. long names, large tables, multilingual text.

Final Thoughts

Generating PDFs from templates is a powerful, maintainable approach — especially in Java applications. Depending on your needs:

  • Use HTML templates when you require dynamic layout, variable-length content, and rich styling.
  • Use PDF templates when your layout is fixed and you only need to swap a few fields.
  • Leverage Word templates (via Spire.Doc) if your team already operates in that environment.

By combining a clean template system with Spire.PDF (and optionally Spire.Doc), you can produce high-quality, data-driven PDFs in a maintainable, scalable way.

FAQs

Q1. Can I use Word templates (DOCX) in Java for PDF generation?

Yes. Use Spire.Doc for Java to load a Word document, replace placeholders, and export to PDF. This workflow is convenient if your organization already maintains templates in Word.

Q2. Can I insert images or charts into templates?

Yes. Whether you generate PDFs from HTML templates or modify PDF templates, you can embed images, charts, shapes, etc. Just ensure your placeholders or template structure allow space for them.

Q3. Why do I need Qt WebEngine or Chrome for HTML-to-PDF conversion?

The HTML-to-PDF conversion must render CSS, fonts, and layout precisely. Spire.PDF delegates the heavy lifting to an external engine (e.g. Qt WebEngine or Chrome). Without a plugin, styles may not render correctly.

Q4. Does Spire.PDF support multiple languages / international text in templates?

Yes. Spire.PDF supports Unicode and can render multilingual content (English, Chinese, Arabic, etc.) without losing formatting.

Get a Free License

To fully experience the capabilities of Spire.PDF for Java without any evaluation limitations, you can request a free 30-day trial license.

Tutorial sulla conversione di file Excel XLS/XLSX in tabelle HTML

I fogli di calcolo sono uno dei modi più comuni per organizzare e analizzare i dati, ma quando si tratta di condividere tali informazioni online, i file Excel (XLS o XLSX) non sono sempre la scelta più pratica. La maggior parte dei siti Web e delle intranet non può visualizzare direttamente i file Excel: gli utenti devono prima scaricarli, aprirli in Excel e spesso perdono il layout o la formattazione nel processo. Ecco perché molti professionisti scelgono di convertire i file Excel in HTML.

La conversione della tua cartella di lavoro o del tuo foglio di calcolo Excel in una tabella HTML consente a chiunque di visualizzare il contenuto direttamente nel proprio browser, senza download e senza software Excel. Che tu voglia incorporare un listino prezzi, un catalogo prodotti, un elenco presenze o un report finanziario, la conversione di file XLS o XLSX in HTML garantisce che i tuoi dati siano accessibili e visivamente coerenti su tutti i dispositivi.

Esistono diversi modi per eseguire questa conversione. Puoi fare clic sui link sottostanti per passare direttamente alla sezione del metodo:

Questa guida copre tutti e tre gli approcci in dettaglio, aiutandoti a scegliere quello migliore a seconda delle tue esigenze, del tuo background tecnico e del tuo flusso di lavoro.


Perché convertire Excel in HTML?

La pubblicazione di dati in formato HTML presenta molti vantaggi. Rende il contenuto del tuo foglio di calcolo facile da accedere e visualizzare su qualsiasi browser o dispositivo, senza richiedere agli utenti di scaricare file Excel. Le tabelle HTML mantengono anche gli stili essenziali, come colori, bordi e celle unite, per preservare la chiarezza visiva del tuo foglio di calcolo.

Quando converti Excel in HTML, puoi:

  • Condividere report, orari o dati sui prezzi direttamente sul Web
  • Incorporare fogli di calcolo in piattaforme CMS o dashboard interni
  • Controllare il layout e lo stile per un risultato professionale e leggibile

Vediamo ora come puoi raggiungere questo obiettivo, iniziando con la funzione integrata di Excel "Salva come pagina Web", seguita da strumenti online e metodi automatizzati.


Metodo 1: Convertire file XLS/XLSX in HTML utilizzando MS Excel

Microsoft Excel fornisce una semplice funzione "Salva come pagina Web" che consente di convertire file .xls o .xlsx in formato .html.

Passaggi:

  1. Apri il tuo file Excel in Microsoft Excel.
  2. Fai clic su File > Salva con nome.
  3. Scegli una cartella di destinazione.

Salva file Excel come pagina Web nelle opzioni di Excel

  1. Da "Salva come", seleziona *Pagina Web (.htm, *.html)**.

Salva file Excel come pagina Web nella finestra di dialogo Salva con nome

  1. Fai clic su Salva. Puoi scegliere Intera cartella di lavoro (tutti i fogli) o Selezione (solo celle specifiche).

Il risultato è un file HTML che mantiene il layout del tuo foglio di calcolo. Puoi caricarlo direttamente sul tuo sito Web o aprirlo in qualsiasi browser. Ecco un esempio di una semplice tabella HTML generata da un foglio di Excel:

Esempio di un foglio Excel convertito in HTML

Pro e contro

Pro Contro
Integrato e gratuito L'output HTML include molti stili in linea
Mantiene la formattazione File di grandi dimensioni, non ideale per il Web moderno
Nessuna connessione Internet richiesta Non adatto per la conversione in batch

Questo metodo è perfetto per conversioni rapide una tantum, ma se hai bisogno di un HTML più pulito o di conversioni ricorrenti, potresti preferire le opzioni successive.


Metodo 2: Convertire Excel in HTML utilizzando strumenti online gratuiti

Se desideri convertire Excel in HTML senza installare software aggiuntivo, esistono molti convertitori online gratuiti in grado di eseguire l'attività direttamente nel tuo browser. Questi strumenti sono utili quando è necessario esportare un foglio di calcolo come pagina Web solo una volta o gestire rapidamente un file di piccole dimensioni.

Qui usiamo Convertitore da Excel a HTML su CLOUDXDOCS come esempio per illustrare come funzionano tali strumenti.

Come usare CLOUDXDOCS

  1. Visita Convertitore da Excel a HTML di CLOUDXDOCS.
  2. Carica il tuo file Excel (in formato .xls o .xlsx).

Carica file Excel nel convertitore da Excel a HTML di CLOUDXDOCS

  1. Il sito Web convertirà automaticamente il tuo foglio di calcolo Excel in HTML.
  2. Una volta completato il processo, scarica il file HTML risultante sul tuo computer.

Scarica il file HTML convertito dal convertitore da Excel a HTML di CLOUDXDOCS

Ogni foglio di lavoro nella cartella di lavoro di Excel verrà salvato come un file HTML separato, mantenendo la maggior parte della formattazione originale, inclusi i bordi delle celle, i colori e l'allineamento del testo. Questo approccio è particolarmente comodo per gli utenti che desiderano condividere i dati dei fogli di calcolo online o incorporare il contenuto delle tabelle direttamente nelle pagine Web senza codifica.

Di seguito è riportato un esempio di un output HTML convertito, che preserva la struttura e il layout del foglio Excel originale.

Anteprima del file HTML convertito dal convertitore da Excel a HTML di CLOUDXDOCS

Sebbene i convertitori online da Excel a HTML siano ideali per conversioni rapide e occasionali, sono più adatti per fogli di calcolo relativamente piccoli o situazioni in cui la praticità è la priorità principale.

Per gli sviluppatori o gli utenti che necessitano di convertire file Excel in HTML in blocco o di automatizzare il processo a livello di codice, il metodo successivo dimostra come ottenere questo risultato utilizzando C#.


Metodo 3: Convertire Excel in HTML automaticamente con C#

Per gli sviluppatori o i team che gestiscono più file, l'automazione è fondamentale. Utilizzando Spire.XLS for .NET, è possibile convertire programmaticamente i file Excel in HTML, preservando tutta la formattazione e il layout ed evitando lo sforzo manuale.

Esempio: Convertire Excel in HTML in C#

using Spire.Xls;

namespace ExcelToHtmlDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            // Load Excel workbook
            Workbook workbook = new Workbook();
            workbook.LoadFromFile("Report.xlsx");

            // Convert first sheet to HTML
            Worksheet sheet = workbook.Worksheets[0];
            sheet.SaveToHtml("Report.html");

            // Optionally export the whole workbook
            // workbook.SaveToHtml("AllSheets.html");
        }
    }
}

Spiegazione

  • LoadFromFile() carica il file Excel in memoria.
  • SaveToHtml() genera un file HTML dal foglio di lavoro o dall'intera cartella di lavoro.
  • L'output mantiene colori, bordi e celle unite esattamente come in Excel.

Ecco un'anteprima del risultato della conversione:

Anteprima del file HTML convertito da Spire.XLS for .NET

Aggiungi percorso di esportazione personalizzato o gestione degli errori

try
{
    Workbook wb = new Workbook();
    wb.LoadFromFile( @"C:\data\sales.xlsx");
    wb.Worksheets[0].SaveToHtml( @"C:\output\sales_table.html");
}
catch (Exception ex)
{
    Console.WriteLine("Conversion failed: " + ex.Message);
}

Quando utilizzare questo approccio:

  • Converti in batch i report di Excel per la pubblicazione sul Web
  • Integra la conversione da Excel a HTML nelle app Web .NET
  • Pianifica conversioni automatiche per dashboard o sistemi di reporting

Questo metodo è scalabile, accurato e non richiede interazione manuale, rendendolo ideale per l'automazione aziendale.

Per ulteriori esempi, consulta il tutorial sulla conversione da Excel a HTML in C#.


Suggerimenti per un output HTML pulito e leggibile

Indipendentemente dal metodo utilizzato, segui queste best practice per ottenere risultati Web migliori:

  • Semplifica la formattazione di Excel prima della conversione (evita colori o stili non necessari).
  • Rimuovi righe/colonne nascoste — potrebbero apparire in HTML inaspettatamente.
  • Comprimi immagini di grandi dimensioni incorporate in Excel.
  • Post-elabora l'HTML se necessario per regolare la larghezza o l'allineamento della tabella.

Se stai pubblicando l'HTML su un sito Web, puoi anche applicare il tuo CSS per definire lo stile delle tabelle in modo coerente tra le pagine.


Domande comuni sulla conversione di Excel in HTML

D1: Posso convertire Excel in HTML gratuitamente?

Sì. Puoi usare Excel stesso o strumenti gratuiti come CLOUDXDOCS.

D2: Le formule o i grafici verranno conservati in HTML?

No. Vengono esportati solo i valori calcolati, non le formule. I grafici possono apparire come immagini se si utilizza la funzione di esportazione di Excel.

D3: Come posso convertire Excel in HTML reattivo?

Puoi racchiudere la <table> esportata in un <div> con CSS come:

div { overflow-x: auto; }

Ciò abilita lo scorrimento orizzontale sui dispositivi mobili.

D4: Come posso automatizzare le conversioni giornaliere?

Puoi pianificare una semplice app console C# utilizzando Utilità di pianificazione di Windows che esegue il tuo script Spire.XLS ogni giorno.


Conclusione

La conversione di file Excel in HTML rende i tuoi dati più accessibili, condivisibili e pronti per il Web. Che tu voglia condividere rapidamente un foglio di calcolo, integrarlo in un sito Web o automatizzare la generazione di HTML su larga scala, esistono strumenti e metodi adatti alle tue esigenze.

Per gli sviluppatori che desiderano automatizzare il processo, Free Spire.XLS for .NET fornisce anche un modo semplice e potente per convertire i file Excel in HTML a livello di codice.

Vedi anche