Change PDF Background Color: White to Custom or Dark

PDF의 흰색 배경이 항상 이상적인 것은 아닙니다. 장시간 독서 시 눈의 피로를 유발하거나, 브랜드 문서에서 매력적이지 않게 보이거나, 스캔한 파일의 결함을 부각시킬 수 있습니다.

이 가이드에서는 Adobe Acrobat Pro를 사용한 영구적인 변경, 빠른 온라인 편집, 일괄 처리를 위한 파이썬 자동화 등 PDF 배경색을 변경하는 세 가지 실용적인 방법을 배웁니다. 보너스 섹션에서는 파일을 수정하지 않고 Adobe Acrobat에서 다크 모드 보기를 활성화하는 방법도 보여줍니다.

이 페이지에서:

PDF 배경색을 변경하는 이유

PDF의 배경색을 변경하면 다음과 같은 이점이 있습니다:

  • 부드럽거나 어두운 배경으로 가독성을 향상시킵니다.
  • 프레젠테이션이나 기업 브랜딩을 위해 시각적 매력을 향상시킵니다.
  • 노란색이나 회색 배경을 가진 스캔한 PDF를 수정합니다.
  • 화면 읽기 시 눈의 피로를 줄입니다.

하지만 단순히 배경을 변경하는 것만으로는 항상 충분하지 않습니다. 가독성을 위해 텍스트 대비가 유지되어야 합니다.

방법 1 — Acrobat Pro 사용 (전문 편집)

Adobe Acrobat Pro를 사용하면 PDF 배경색을 영구적으로 수정하여 모든 독자에게 적용되는 진정한 파일 수준 변경을 만들 수 있습니다. 이 방법은 흰색 배경을 연한 회색, 부드러운 베이지 또는 다른 색상으로 변경하면서 검은색 또는 어두운 텍스트를 완전히 읽을 수 있도록 유지하는 데 이상적입니다.

Change PDF Background Color with Adobe

Adobe를 사용하여 PDF 배경색을 변경하는 단계

  1. 컴퓨터에서 Adobe Acrobat Pro를 실행합니다.
  2. 상단 메뉴에서 도구를 클릭하고 PDF 편집을 선택합니다.
  3. 보조 도구 모음에서 더 보기배경추가/업데이트를 클릭합니다.
  4. 색상을 클릭한 다음 원하는 배경색(예: 연한 회색)을 선택합니다.
  5. 모든 페이지에 변경 사항을 적용하거나 특정 페이지를 선택합니다.
  6. 확인을 클릭한 다음 문서를 저장하여 새 배경을 보존합니다.

장점

  • 직관적이고 사용자 친화적인 인터페이스.
  • 텍스트 가독성을 유지합니다.
  • 페이지별 정밀한 색상 선택.

단점

  • 유료 소프트웨어가 필요합니다.
  • 일괄 처리에 적합하지 않습니다.

방법 2 — 온라인 도구 사용 (빠르고 무료)

온라인 PDF 도구는 소프트웨어를 설치하지 않고도 배경을 변경할 수 있는 빠르고 편리한 방법을 제공합니다. 프레젠테이션이나 브랜딩 업데이트와 같은 간단한 편집에 이상적이지만 대부분은 텍스트 색상을 자동으로 조정하지 않습니다.

Change PDF Background Color Online

온라인에서 PDF 배경색을 변경하는 단계

  1. WorkinTool과 같은 신뢰할 수 있는 온라인 PDF 도구를 엽니다.
  2. PDF 업로드를 클릭하고 장치에서 파일을 선택합니다.
  3. 인터페이스에서 배경색 도구를 찾습니다.
  4. 팔레트에서 새 배경색을 선택하거나 사용자 지정 16진수 코드를 입력합니다.
  5. 모든 페이지에 색상 변경을 적용합니다.
  6. 업데이트된 PDF를 다운로드하고 결과를 검토하여 가독성을 확인합니다.

장점

  • 설치가 필요 없습니다.
  • 작은 편집에 빠릅니다.
  • 모든 장치에서 작동합니다.

단점

  • 종종 파일 크기 제한이 있습니다.
  • 기밀 문서에는 적합하지 않을 수 있습니다.

방법 3 — Spire.PDF와 함께 파이썬 사용 (일괄 처리)

여러 문서를 관리하는 개발자 및 기업을 위해 Spire.PDF프로그래밍 방식의 PDF 편집을 위한 효율적이고 확장 가능한 파이썬 솔루션을 제공합니다. 이 라이브러리는 Adobe Acrobat 없이 배경 변경 및 일괄 처리를 지원합니다.

이 방법을 사용하면 수백 개의 문서에 일관된 배경색을 적용하여 시간을 절약하고 균일성을 보장할 수 있습니다.

Python Library to Change PDF Background Color

단계

  1. 환경에 Spire.PDF for Python을 설치합니다 (pip install spire.pdf).
  2. 처리하려는 PDF 파일을 준비하고 폴더에 넣습니다.
  3. 파이썬 편집기를 열고 각 PDF 파일을 순환하는 스크립트를 만듭니다.
  4. 각 페이지에 대해 배경색을 원하는 음영으로 설정합니다.
  5. 수정된 PDF를 새 폴더에 저장하여 원본을 보존합니다.

예제 파이썬 코드 (일괄 처리)

from spire.pdf.common import *
from spire.pdf import *
import os

# Input and output folders
input_folder = "C:\\Users\\Administrator\\Desktop\\PDFs"
output_folder = "C:\\Users\\Administrator\\Desktop\\Output"

# Loop through all PDF files in the input folder
for filename in os.listdir(input_folder):
    if filename.endswith(".pdf"):
        file_path = os.path.join(input_folder, filename)

        # Load the PDF
        doc = PdfDocument()
        doc.LoadFromFile(file_path)

        # Change background color for all pages
        for i in range(doc.Pages.Count):
            page = doc.Pages.get_Item(i)
            page.BackgroundColor = Color.get_LightYellow()

        # Save updated PDF to output folder
        output_path = os.path.join(output_folder, filename)
        doc.SaveToFile(output_path)

장점

  • 대량 처리를 자동화합니다.
  • 여러 PDF에서 일관된 결과를 얻을 수 있습니다.
  • 브랜딩 또는 워크플로 자동화에 이상적입니다.

단점

  • 기존 텍스트의 색상을 자동으로 변경할 수 없습니다.
  • 기본적인 파이썬 지식이 필요합니다.

팁: 이 방법을 일괄 업데이트에 사용하되, 진정한 다크 모드 가독성을 위해서는 텍스트 색상 조정이 필요합니다.

더 읽어보기 : 파이썬을 사용하여 PDF의 배경색 또는 이미지 설정

가독성 유지를 위한 모범 사례

PDF 배경을 변경할 때 다음 지침을 따르십시오:

  • 고대비 조합을 사용하십시오: 밝은 배경에 어두운 텍스트 또는 어두운 배경에 밝은 텍스트.
  • 눈의 피로를 줄이기 위해 배경에 순수한 검은색(#000000)을 피하십시오.
  • 배경 변경 후에도 텍스트 색상을 읽을 수 있도록 유지하십시오.
  • 일관성을 보장하기 위해 다른 장치나 PDF 리더에서 문서를 테스트하십시오.
  • 스캔한 PDF의 경우 배경색을 적용하기 전에 노이즈 감소 및 대비 향상을 고려하십시오.

팁: 연한 회색(#f2f2f2)과 같은 미묘한 음영은 독자를 압도하거나 텍스트를 스캔하기 어렵게 만들지 않으면서 전문적인 맥락에서 잘 작동합니다.

보너스 — Adobe Acrobat에서 다크 모드 보기 (뷰어 수준)

목표가 편안한 화면 읽기라면 Adobe Acrobat은 뷰어 수준의 다크 모드를 제공합니다. 이 방법은 PDF 파일을 수정하지 않고 리더에서 배경 및 텍스트 색상을 변경하여 다크 모드를 시뮬레이션합니다.

Dark Mode Viewing in Adobe

단계

  1. 컴퓨터에서 Adobe Acrobat을 실행합니다.
  2. 편집기본 설정접근성으로 이동합니다.
  3. 문서 색상 바꾸기를 활성화합니다.
  4. 사용자 지정 색상을 선택한 다음 설정합니다:
    • 페이지 배경 → 어두운 회색
    • 문서 텍스트 → 연한 회색 또는 흰색
  5. 확인을 클릭하고 PDF를 다크 모드로 봅니다.

참고: 변경 사항은 Acrobat Reader에서만 적용됩니다. 원본 PDF 파일은 변경되지 않습니다.

결론

PDF의 배경색을 변경하면 가독성과 미학이 모두 향상됩니다. 올바른 방법을 선택하는 것은 목표에 따라 다릅니다:

  • Adobe Acrobat Pro: 정밀한 제어로 배경을 편집할 수 있는 사용하기 쉬운 전문 인터페이스를 원하는 사용자에게 가장 적합합니다.
  • 온라인 도구: 일회성 편집이나 프레젠테이션 파일에 빠르고 편리합니다.
  • 파이썬 (Spire.PDF): 일괄 처리, 자동화 및 여러 문서에서 일관된 스타일링을 보장하는 데 이상적입니다.
  • 보너스 뷰어 수준 다크 모드: PDF 파일을 변경하지 않고 개인적인 편안한 독서에 유용합니다.

스캔한 PDF의 경우 배경색만 조정하는 것만으로는 충분하지 않을 수 있습니다. 최적의 결과를 위해 배경 변경과 대비 향상 또는 노이즈 제거를 결합하는 것을 고려하십시오. 적절한 방법을 선택하고 모범 사례를 적용하면 장치와 환경 전반에서 시각적으로 매력적이고 읽기 쉬운 PDF를 만들 수 있습니다.

자주 묻는 질문

Q1. PDF 배경색을 무료로 변경할 수 있나요?

예, 온라인 도구는 무료로 이 작업을 수행할 수 있지만 품질과 기능에 제한이 있는 경우가 많습니다.

Q2. PDF를 영구적으로 다크 모드로 만들려면 어떻게 해야 하나요?

대부분의 도구는 진정한 영구 다크 모드를 지원하지 않습니다. 배경과 텍스트 색상을 모두 수정해야 하는데, 이는 표준 도구로는 쉽게 달성할 수 없습니다.

Q3. 배경을 변경한 후 텍스트가 읽기 어려워지는 이유는 무엇인가요?

텍스트 색상이 변경되지 않았기 때문입니다. 어두운 배경에 검은색 텍스트는 대비를 감소시킵니다.

Q4. PDF 배경색을 일괄 변경할 수 있나요?

예, Spire.PDF와 같은 파이썬 라이브러리를 사용하는 것이 여러 파일을 처리하는 가장 효율적인 방법입니다.

참고 항목

Cambia colore di sfondo del PDF: da bianco a personalizzato o scuro

Gli sfondi bianchi nei PDF non sono sempre ideali. Possono causare affaticamento degli occhi durante lunghe sessioni di lettura, apparire poco attraenti in documenti brandizzati o evidenziare imperfezioni nei file scansionati.

In questa guida, imparerai tre modi pratici per cambiare il colore di sfondo del PDF, incluse modifiche permanenti con Adobe Acrobat Pro, modifiche rapide online e automazione con Python per l'elaborazione batch. Una sezione bonus mostra anche come abilitare la visualizzazione in modalità scura in Adobe Acrobat senza modificare il file.

In questa pagina:

Perché cambiare il colore di sfondo del PDF?

Cambiare il colore di sfondo di un PDF può:

  • Migliorare la leggibilità con sfondi più tenui o più scuri.
  • Migliorare l'aspetto visivo per presentazioni o branding aziendale.
  • Correggere i PDF scansionati che hanno sfondi gialli o grigi.
  • Ridurre l'affaticamento degli occhi durante la lettura su schermo.

Tuttavia, cambiare semplicemente lo sfondo non è sempre sufficiente: il contrasto del testo deve essere preservato per la leggibilità.

Metodo 1 — Utilizzo di Acrobat Pro (Modifica professionale)

Adobe Acrobat Pro consente di modificare in modo permanente il colore di sfondo del PDF, creando una vera e propria modifica a livello di file che si applica a tutti i lettori. Questo metodo è ideale per cambiare sfondi bianchi in grigio chiaro, beige tenue o altri colori, mantenendo il testo nero o scuro completamente leggibile.

Cambia il colore di sfondo del PDF con Adobe

Passaggi per cambiare il colore di sfondo del PDF con Adobe

  1. Avvia Adobe Acrobat Pro sul tuo computer.
  2. Fai clic su Strumenti nel menu in alto e seleziona Modifica PDF.
  3. Nella barra degli strumenti secondaria, fai clic su AltroSfondoAggiungi/Aggiorna.
  4. Fai clic su Colore, quindi scegli il colore di sfondo desiderato (ad es. grigio chiaro).
  5. Applica le modifiche a tutte le pagine o seleziona pagine specifiche.
  6. Fai clic su OK, quindi salva il documento per conservare il nuovo sfondo.

Vantaggi

  • Interfaccia intuitiva e facile da usare.
  • Mantiene la leggibilità del testo.
  • Selezione precisa del colore per pagina.

Svantaggi

  • È richiesto un software a pagamento.
  • Non adatto per l'elaborazione batch.

Metodo 2 — Utilizzo di uno strumento online (Veloce e gratuito)

Gli strumenti PDF online offrono un modo rapido e conveniente per cambiare gli sfondi senza installare software. Sono ideali per modifiche semplici come presentazioni o aggiornamenti di branding, sebbene la maggior parte non regoli automaticamente il colore del testo.

Cambia il colore di sfondo del PDF online

Passaggi per cambiare il colore di sfondo del PDF online

  1. Apri uno strumento PDF online affidabile come WorkinTool.
  2. Fai clic su Carica PDF e seleziona il file dal tuo dispositivo.
  3. Individua lo strumento Colore di sfondo nell'interfaccia.
  4. Seleziona un nuovo colore di sfondo dalla tavolozza o inserisci un codice esadecimale personalizzato.
  5. Applica la modifica del colore a tutte le pagine.
  6. Scarica il PDF aggiornato e controlla il risultato per assicurarti della leggibilità.

Vantaggi

  • Nessuna installazione richiesta.
  • Veloce per piccole modifiche.
  • Funziona su qualsiasi dispositivo.

Svantaggi

  • Spesso ha una limitazione sulla dimensione del file.
  • Potrebbe non essere adatto per documenti riservati.

Metodo 3 — Utilizzo di Python con Spire.PDF (Elaborazione batch)

Per sviluppatori e aziende che gestiscono più documenti, Spire.PDF offre una soluzione Python efficiente e scalabile per la modifica programmatica dei PDF. Questa libreria supporta le modifiche dello sfondo e l'elaborazione batch senza la necessità di Adobe Acrobat.

Questo metodo consente di applicare un colore di sfondo uniforme a centinaia di documenti, risparmiando tempo e garantendo l'uniformità.

Libreria Python per cambiare il colore di sfondo del PDF

Passaggi

  1. Installa Spire.PDF per Python nel tuo ambiente (pip install spire.pdf).
  2. Prepara i file PDF che desideri elaborare e inseriscili in una cartella.
  3. Apri il tuo editor Python e crea uno script per scorrere ogni file PDF.
  4. Per ogni pagina, imposta il colore di sfondo sulla tonalità desiderata.
  5. Salva il PDF modificato in una nuova cartella per conservare gli originali.

Esempio di codice Python (Elaborazione batch)

from spire.pdf.common import *
from spire.pdf import *
import os

# Input and output folders
input_folder = "C:\\Users\\Administrator\\Desktop\\PDFs"
output_folder = "C:\\Users\\Administrator\\Desktop\\Output"

# Loop through all PDF files in the input folder
for filename in os.listdir(input_folder):
    if filename.endswith(".pdf"):
        file_path = os.path.join(input_folder, filename)

        # Load the PDF
        doc = PdfDocument()
        doc.LoadFromFile(file_path)

        # Change background color for all pages
        for i in range(doc.Pages.Count):
            page = doc.Pages.get_Item(i)
            page.BackgroundColor = Color.get_LightYellow()

        # Save updated PDF to output folder
        output_path = os.path.join(output_folder, filename)
        doc.SaveToFile(output_path)

Vantaggi

  • Automatizza l'elaborazione di massa.
  • Risultati coerenti su più PDF.
  • Ideale per il branding o l'automazione del flusso di lavoro.

Svantaggi

  • Non può ricolorare automaticamente il testo esistente.
  • Richiede una conoscenza di base di Python.

Suggerimento: utilizza questo metodo per aggiornamenti batch, ma per una vera leggibilità in modalità scura, sono necessarie regolazioni del colore del testo.

Leggi anche : Imposta un colore di sfondo o un'immagine per PDF usando Python

Migliori pratiche per mantenere la leggibilità

Quando si cambiano gli sfondi dei PDF, seguire queste linee guida:

  • Utilizzare combinazioni ad alto contrasto: testo scuro su sfondi chiari o testo chiaro su sfondi scuri.
  • Evitare il nero puro (#000000) per lo sfondo per ridurre l'affaticamento degli occhi.
  • Mantenere i colori del testo leggibili dopo le modifiche allo sfondo.
  • Testare i documenti su dispositivi o lettori PDF diversi per garantire la coerenza.
  • Per i PDF scansionati, considerare la riduzione del rumore e il miglioramento del contrasto prima di applicare il colore di sfondo.

Suggerimento: tonalità tenui come il grigio chiaro (#f2f2f2) funzionano bene in contesti professionali senza sopraffare il lettore o rendere il testo difficile da scansionare.

Bonus — Visualizzazione in modalità scura in Adobe Acrobat (a livello di visualizzatore)

Se il tuo obiettivo è una lettura confortevole su schermo, Adobe Acrobat offre una modalità scura a livello di visualizzatore. Questo metodo non modifica il file PDF, ma simula la modalità scura cambiando i colori dello sfondo e del testo nel lettore.

Visualizzazione in modalità scura in Adobe

Passaggi

  1. Avvia Adobe Acrobat sul tuo computer.
  2. Vai a ModificaPreferenzeAccessibilità.
  3. Abilita Sostituisci colori documento.
  4. Seleziona Colore personalizzato, quindi imposta:
    • Sfondo pagina → grigio scuro
    • Testo documento → grigio chiaro o bianco
  5. Fai clic su OK e visualizza il tuo PDF in modalità scura.

Nota: le modifiche si applicano solo nel tuo Acrobat Reader. Il file PDF originale rimane invariato.

Conclusione

Cambiare il colore di sfondo dei PDF migliora sia la leggibilità che l'estetica. La scelta del metodo giusto dipende dai tuoi obiettivi:

  • Adobe Acrobat Pro: Ideale per gli utenti che desiderano un'interfaccia facile da usare e professionale per modificare gli sfondi con un controllo preciso.
  • Strumenti online: Veloci e convenienti per modifiche occasionali o file di presentazione.
  • Python (Spire.PDF): Ideale per l'elaborazione batch, l'automazione e per garantire uno stile coerente su più documenti.
  • Modalità scura bonus a livello di visualizzatore: Utile per una lettura confortevole personale senza alterare il file PDF.

Per i PDF scansionati, la sola regolazione del colore di sfondo potrebbe non essere sufficiente: considera di combinare le modifiche dello sfondo con il miglioramento del contrasto o la rimozione del rumore per risultati ottimali. Scegliendo il metodo appropriato e applicando le migliori pratiche, puoi creare PDF che siano sia visivamente accattivanti che facili da leggere su tutti i dispositivi e ambienti.

Domande frequenti

D1. Posso cambiare gratuitamente il colore di sfondo del PDF?

Sì, gli strumenti online possono farlo gratuitamente, ma spesso hanno limitazioni in termini di qualità e funzionalità.

D2. Come posso rendere un PDF in modalità scura in modo permanente?

La maggior parte degli strumenti non supporta una vera modalità scura permanente. Dovresti modificare sia i colori dello sfondo che del testo, il che non è facilmente realizzabile con gli strumenti standard.

D3. Perché il mio testo diventa difficile da leggere dopo aver cambiato lo sfondo?

Perché il colore del testo rimane invariato. Il testo nero su uno sfondo scuro riduce il contrasto.

D4. Posso cambiare in batch il colore di sfondo dei PDF?

Sì, l'utilizzo di librerie Python come Spire.PDF è il modo più efficiente per elaborare più file.

Vedi anche

Change PDF Background Color: White to Custom or Dark

Les arrière-plans blancs dans les PDF ne sont pas toujours idéaux. Ils peuvent provoquer une fatigue oculaire lors de longues sessions de lecture, paraître peu attrayants dans les documents de marque ou mettre en évidence les imperfections des fichiers numérisés.

Dans ce guide, vous apprendrez trois manières pratiques de changer la couleur de fond d'un PDF, y compris des modifications permanentes à l'aide d'Adobe Acrobat Pro, des modifications rapides en ligne et l'automatisation avec Python pour le traitement par lots. Une section bonus montre également comment activer l'affichage en mode sombre dans Adobe Acrobat sans modifier le fichier.

Sur cette page :

Pourquoi changer la couleur de fond d'un PDF ?

Changer la couleur de fond d'un PDF peut :

  • Améliorer la lisibilité avec des arrière-plans plus doux ou plus sombres.
  • Améliorer l'attrait visuel pour les présentations ou l'image de marque de l'entreprise.
  • Corriger les PDF numérisés qui ont des arrière-plans jaunes ou gris.
  • Réduire la fatigue oculaire pour la lecture à l'écran.

Cependant, changer simplement l'arrière-plan n'est pas toujours suffisant — le contraste du texte doit être préservé pour la lisibilité.

Méthode 1 — Utiliser Acrobat Pro (Édition professionnelle)

Adobe Acrobat Pro vous permet de modifier de manière permanente la couleur de fond du PDF, créant une véritable modification au niveau du fichier qui s'applique à tous les lecteurs. Cette méthode est idéale pour changer les arrière-plans blancs en gris clair, beige doux ou autres couleurs tout en gardant le texte noir ou foncé entièrement lisible.

Change PDF Background Color with Adobe

Étapes pour changer la couleur de fond d'un PDF avec Adobe

  1. Lancez Adobe Acrobat Pro sur votre ordinateur.
  2. Cliquez sur Outils dans le menu supérieur et sélectionnez Modifier le PDF.
  3. Dans la barre d'outils secondaire, cliquez sur PlusArrière-planAjouter/Mettre à jour.
  4. Cliquez sur Couleur, puis choisissez la couleur de fond souhaitée (par exemple, gris clair).
  5. Appliquez les modifications à toutes les pages ou sélectionnez des pages spécifiques.
  6. Cliquez sur OK, puis enregistrez le document pour conserver le nouvel arrière-plan.

Avantages

  • Interface intuitive et conviviale.
  • Maintient la lisibilité du texte.
  • Sélection précise des couleurs par page.

Inconvénients

  • Logiciel payant requis.
  • Ne convient pas au traitement par lots.

Méthode 2 — Utiliser un outil en ligne (Rapide et gratuit)

Les outils PDF en ligne offrent un moyen rapide et pratique de changer les arrière-plans sans installer de logiciel. Ils sont idéaux pour des modifications simples comme les présentations ou les mises à jour de marque, bien que la plupart n'ajustent pas automatiquement la couleur du texte.

Change PDF Background Color Online

Étapes pour changer la couleur de fond d'un PDF en ligne

  1. Ouvrez un outil PDF en ligne de confiance tel que WorkinTool.
  2. Cliquez sur Télécharger le PDF et sélectionnez le fichier depuis votre appareil.
  3. Localisez l'outil Couleur de l'arrière-plan dans l'interface.
  4. Sélectionnez une nouvelle couleur de fond dans la palette ou entrez un code hexadécimal personnalisé.
  5. Appliquez le changement de couleur à toutes les pages.
  6. Téléchargez le PDF mis à jour et vérifiez le résultat pour vous assurer de la lisibilité.

Avantages

  • Aucune installation requise.
  • Rapide pour les petites modifications.
  • Fonctionne sur n'importe quel appareil.

Inconvénients

  • A souvent une limitation de taille de fichier.
  • Peut ne pas convenir aux documents confidentiels.

Méthode 3 — Utiliser Python avec Spire.PDF (Traitement par lots)

Pour les développeurs et les entreprises gérant plusieurs documents, Spire.PDF offre une solution Python efficace et évolutive pour l'édition programmatique de PDF. Cette bibliothèque prend en charge les changements d'arrière-plan et le traitement par lots sans avoir besoin d'Adobe Acrobat.

Cette méthode vous permet d'appliquer une couleur de fond cohérente sur des centaines de documents, ce qui permet de gagner du temps et d'assurer l'uniformité.

Python Library to Change PDF Background Color

Étapes

  1. Installez Spire.PDF pour Python dans votre environnement (pip install spire.pdf).
  2. Préparez les fichiers PDF que vous souhaitez traiter et placez-les dans un dossier.
  3. Ouvrez votre éditeur Python et créez un script pour parcourir chaque fichier PDF.
  4. Pour chaque page, définissez la couleur de fond sur la teinte souhaitée.
  5. Enregistrez le PDF modifié dans un nouveau dossier pour préserver les originaux.

Exemple de code Python (Traitement par lots)

from spire.pdf.common import *
from spire.pdf import *
import os

# Input and output folders
input_folder = "C:\\Users\\Administrator\\Desktop\\PDFs"
output_folder = "C:\\Users\\Administrator\\Desktop\\Output"

# Loop through all PDF files in the input folder
for filename in os.listdir(input_folder):
    if filename.endswith(".pdf"):
        file_path = os.path.join(input_folder, filename)

        # Load the PDF
        doc = PdfDocument()
        doc.LoadFromFile(file_path)

        # Change background color for all pages
        for i in range(doc.Pages.Count):
            page = doc.Pages.get_Item(i)
            page.BackgroundColor = Color.get_LightYellow()

        # Save updated PDF to output folder
        output_path = os.path.join(output_folder, filename)
        doc.SaveToFile(output_path)

Avantages

  • Automatise le traitement en masse.
  • Résultats cohérents sur plusieurs PDF.
  • Idéal pour l'image de marque ou l'automatisation des flux de travail.

Inconvénients

  • Ne peut pas recolorer automatiquement le texte existant.
  • Nécessite des connaissances de base en Python.

Conseil : Utilisez cette méthode pour les mises à jour par lots, mais pour une véritable lisibilité en mode sombre, des ajustements de la couleur du texte sont nécessaires.

Lire la suite : Définir une couleur ou une image d'arrière-plan pour un PDF en utilisant Python

Meilleures pratiques pour maintenir la lisibilité

Lorsque vous changez les arrière-plans des PDF, suivez ces directives :

  • Utilisez des combinaisons à fort contraste : texte sombre sur fond clair ou texte clair sur fond sombre.
  • Évitez le noir pur (#000000) pour l'arrière-plan afin de réduire la fatigue oculaire.
  • Gardez les couleurs du texte lisibles après les changements d'arrière-plan.
  • Testez les documents sur différents appareils ou lecteurs PDF pour garantir la cohérence.
  • Pour les PDF numérisés, envisagez la réduction du bruit et l'amélioration du contraste avant d'appliquer la couleur de fond.

Conseil : Des teintes subtiles comme le gris clair (#f2f2f2) fonctionnent bien dans des contextes professionnels sans submerger le lecteur ni rendre le texte difficile à numériser.

Bonus — Affichage en mode sombre dans Adobe Acrobat (Niveau visionneuse)

Si votre objectif est une lecture confortable à l'écran, Adobe Acrobat propose un mode sombre au niveau de la visionneuse. Cette méthode ne modifie pas le fichier PDF, mais simule le mode sombre en changeant les couleurs de l'arrière-plan et du texte dans le lecteur.

Dark Mode Viewing in Adobe

Étapes

  1. Lancez Adobe Acrobat sur votre ordinateur.
  2. Allez dans ÉditionPréférencesAccessibilité.
  3. Activez Remplacer les couleurs du document.
  4. Sélectionnez Couleur personnalisée, puis définissez :
    • Arrière-plan de la page → gris foncé
    • Texte du document → gris clair ou blanc
  5. Cliquez sur OK et affichez votre PDF en mode sombre.

Remarque : Les modifications s'appliquent uniquement dans votre lecteur Acrobat. Le fichier PDF original reste inchangé.

Conclusion

Changer la couleur de fond des PDF améliore à la fois la lisibilité et l'esthétique. Le choix de la bonne méthode dépend de vos objectifs :

  • Adobe Acrobat Pro : Idéal pour les utilisateurs qui souhaitent une interface professionnelle et facile à utiliser pour modifier les arrière-plans avec un contrôle précis.
  • Outils en ligne : Rapides et pratiques pour des modifications ponctuelles ou des fichiers de présentation.
  • Python (Spire.PDF) : Idéal pour le traitement par lots, l'automatisation et la garantie d'un style cohérent sur plusieurs documents.
  • Mode sombre au niveau de la visionneuse (Bonus) : Utile pour un confort de lecture personnel sans modifier le fichier PDF.

Pour les PDF numérisés, ajuster uniquement la couleur de fond peut ne pas être suffisant — envisagez de combiner les changements d'arrière-plan avec une amélioration du contraste ou une suppression du bruit pour des résultats optimaux. En choisissant la méthode appropriée et en appliquant les meilleures pratiques, vous pouvez créer des PDF à la fois visuellement attrayants et faciles à lire sur tous les appareils et environnements.

FAQ

Q1. Puis-je changer gratuitement la couleur de fond d'un PDF ?

Oui, les outils en ligne peuvent le faire gratuitement, mais ils ont souvent des limitations en termes de qualité et de fonctionnalités.

Q2. Comment puis-je mettre un PDF en mode sombre de manière permanente ?

La plupart des outils ne prennent pas en charge un véritable mode sombre permanent. Vous auriez besoin de modifier à la fois les couleurs de l'arrière-plan et du texte, ce qui n'est pas facilement réalisable avec les outils standard.

Q3. Pourquoi mon texte devient-il difficile à lire après avoir changé l'arrière-plan ?

Parce que la couleur du texte reste inchangée. Le texte noir sur un fond sombre réduit le contraste.

Q4. Puis-je changer la couleur de fond de plusieurs PDF par lots ?

Oui, l'utilisation de bibliothèques Python comme Spire.PDF est le moyen le plus efficace de traiter plusieurs fichiers.

Voir aussi

Change PDF Background Color: White to Custom or Dark

Los fondos blancos en los PDF no siempre son ideales. Pueden causar fatiga visual durante largas sesiones de lectura, parecer poco atractivos en documentos de marca o resaltar imperfecciones en archivos escaneados.

En esta guía, aprenderá tres formas prácticas de cambiar el color de fondo de un PDF, incluidos los cambios permanentes con Adobe Acrobat Pro, las ediciones rápidas en línea y la automatización con Python para el procesamiento por lotes. Una sección adicional también muestra cómo habilitar la visualización en modo oscuro en Adobe Acrobat sin modificar el archivo.

En esta página:

¿Por Qué Cambiar el Color de Fondo del PDF?

Cambiar el color de fondo de un PDF puede:

  • Mejorar la legibilidad con fondos más suaves u oscuros.
  • Mejorar el atractivo visual para presentaciones o branding corporativo.
  • Corregir PDF escaneados que tienen fondos amarillos o grises.
  • Reducir la fatiga visual para la lectura en pantalla.

Sin embargo, simplemente cambiar el fondo no siempre es suficiente: el contraste del texto debe preservarse para la legibilidad.

Método 1 — Usando Acrobat Pro (Edición Profesional)

Adobe Acrobat Pro le permite modificar permanentemente el color de fondo del PDF, creando un verdadero cambio a nivel de archivo que se aplica a todos los lectores. Este método es ideal para cambiar fondos blancos a gris claro, beige suave u otros colores, manteniendo el texto negro u oscuro completamente legible.

Change PDF Background Color with Adobe

Pasos para Cambiar el Color de Fondo del PDF Usando Adobe

  1. Inicie Adobe Acrobat Pro en su computadora.
  2. Haga clic en Herramientas en el menú superior y seleccione Editar PDF .
  3. En la barra de herramientas secundaria, haga clic en MásFondoAñadir/Actualizar .
  4. Haga clic en Color , luego elija el color de fondo deseado (por ejemplo, gris claro).
  5. Aplique los cambios a todas las páginas o seleccione páginas específicas.
  6. Haga clic en Aceptar , luego guarde el documento para conservar el nuevo fondo.

Pros

  • Interfaz intuitiva y fácil de usar.
  • Mantiene la legibilidad del texto.
  • Selección precisa de color por página.

Contras

  • Se requiere software de pago.
  • No es adecuado para el procesamiento por lotes.

Método 2 — Usando una Herramienta en Línea (Rápido y Gratis)

Las herramientas de PDF en línea ofrecen una forma rápida y conveniente de cambiar fondos sin instalar software. Son ideales para ediciones simples como presentaciones o actualizaciones de marca, aunque la mayoría no ajusta el color del texto automáticamente.

Change PDF Background Color Online

Pasos para Cambiar el Color de Fondo del PDF en Línea

  1. Abra una herramienta de PDF en línea de confianza como WorkinTool.
  2. Haga clic en Subir PDF y seleccione el archivo de su dispositivo.
  3. Localice la herramienta Color de Fondo en la interfaz.
  4. Seleccione un nuevo color de fondo de la paleta o ingrese un código hexadecimal personalizado.
  5. Aplique el cambio de color a todas las páginas.
  6. Descargue el PDF actualizado y revise el resultado para asegurar la legibilidad.

Pros

  • No requiere instalación.
  • Rápido para ediciones pequeñas.
  • Funciona en cualquier dispositivo.

Contras

  • A menudo tiene limitación de tamaño de archivo.
  • Puede no ser adecuado para documentos confidenciales.

Método 3 — Usando Python con Spire.PDF (Procesamiento por Lotes)

Para desarrolladores y empresas que gestionan múltiples documentos, Spire.PDF ofrece una solución de Python eficiente y escalable para la edición programática de PDF. Esta biblioteca admite cambios de fondo y procesamiento por lotes sin necesidad de Adobe Acrobat.

Este método le permite aplicar un color de fondo consistente en cientos de documentos, ahorrando tiempo y asegurando la uniformidad.

Python Library to Change PDF Background Color

Pasos

  1. Instale Spire.PDF para Python en su entorno (pip install spire.pdf).
  2. Prepare los archivos PDF que desea procesar y colóquelos en una carpeta.
  3. Abra su editor de Python y cree un script para recorrer cada archivo PDF.
  4. Para cada página, establezca el color de fondo en el tono deseado.
  5. Guarde el PDF modificado en una nueva carpeta para conservar los originales.

Ejemplo de Código Python (Procesamiento por Lotes)

from spire.pdf.common import *
from spire.pdf import *
import os

# Input and output folders
input_folder = "C:\\Users\\Administrator\\Desktop\\PDFs"
output_folder = "C:\\Users\\Administrator\\Desktop\\Output"

# Loop through all PDF files in the input folder
for filename in os.listdir(input_folder):
    if filename.endswith(".pdf"):
        file_path = os.path.join(input_folder, filename)

        # Load the PDF
        doc = PdfDocument()
        doc.LoadFromFile(file_path)

        # Change background color for all pages
        for i in range(doc.Pages.Count):
            page = doc.Pages.get_Item(i)
            page.BackgroundColor = Color.get_LightYellow()

        # Save updated PDF to output folder
        output_path = os.path.join(output_folder, filename)
        doc.SaveToFile(output_path)

Pros

  • Automatiza el procesamiento masivo.
  • Resultados consistentes en múltiples PDF.
  • Ideal para branding o automatización de flujos de trabajo.

Contras

  • No puede recolorear automáticamente el texto existente.
  • Requiere conocimientos básicos de Python.

Consejo: Use este método para actualizaciones por lotes, pero para una verdadera legibilidad en modo oscuro, se necesitan ajustes en el color del texto.

Leer Más : Establecer un Color de Fondo o Imagen para PDF Usando Python

Mejores Prácticas para Mantener la Legibilidad

Al cambiar los fondos de los PDF, siga estas pautas:

  • Use combinaciones de alto contraste: texto oscuro sobre fondos claros o texto claro sobre fondos oscuros.
  • Evite el negro puro (#000000) para el fondo para reducir la fatiga visual.
  • Mantenga los colores del texto legibles después de los cambios de fondo.
  • Pruebe los documentos en diferentes dispositivos o lectores de PDF para garantizar la consistencia.
  • Para los PDF escaneados, considere la reducción de ruido y la mejora del contraste antes de aplicar el color de fondo.

Consejo: Los tonos sutiles como el gris claro (#f2f2f2) funcionan bien en contextos profesionales sin abrumar al lector ni dificultar la lectura del texto.

Bono — Visualización en Modo Oscuro en Adobe Acrobat (Nivel de Visor)

Si su objetivo es una lectura cómoda en pantalla, Adobe Acrobat ofrece un modo oscuro a nivel de visor. Este método no modifica el archivo PDF, sino que simula el modo oscuro cambiando los colores del fondo y del texto en el lector.

Dark Mode Viewing in Adobe

Pasos

  1. Inicie Adobe Acrobat en su computadora.
  2. Vaya a EdiciónPreferenciasAccesibilidad .
  3. Habilite Reemplazar colores del documento .
  4. Seleccione Color personalizado , luego establezca:
    • Fondo de página → gris oscuro
    • Texto del documento → gris claro o blanco
  5. Haga clic en Aceptar y vea su PDF en modo oscuro.

Nota: Los cambios se aplican solo en su Acrobat Reader. El archivo PDF original permanece sin cambios.

Conclusión

Cambiar el color de fondo de los PDF mejora tanto la legibilidad como la estética. Seleccionar el método correcto depende de sus objetivos:

  • Adobe Acrobat Pro: Ideal para usuarios que desean una interfaz profesional y fácil de usar para editar fondos con control preciso.
  • Herramientas en línea: Rápidas y convenientes para ediciones únicas o archivos de presentación.
  • Python (Spire.PDF): Ideal para el procesamiento por lotes, la automatización y para garantizar un estilo consistente en múltiples documentos.
  • Modo oscuro a nivel de visor (Bono): Útil para una lectura personal cómoda sin alterar el archivo PDF.

Para los PDF escaneados, ajustar solo el color de fondo puede no ser suficiente; considere combinar los cambios de fondo con la mejora del contraste o la eliminación de ruido para obtener resultados óptimos. Al elegir el método apropiado y aplicar las mejores prácticas, puede crear PDF que sean visualmente atractivos y fáciles de leer en todos los dispositivos y entornos.

Preguntas Frecuentes

P1. ¿Puedo cambiar el color de fondo del PDF de forma gratuita?

Sí, las herramientas en línea pueden hacerlo de forma gratuita, pero a menudo tienen limitaciones en cuanto a calidad y funciones.

P2. ¿Cómo hago que un PDF tenga modo oscuro de forma permanente?

La mayoría de las herramientas no admiten un verdadero modo oscuro permanente. Necesitaría modificar tanto los colores del fondo como del texto, lo cual no es fácil de lograr con las herramientas estándar.

P3. ¿Por qué mi texto se vuelve difícil de leer después de cambiar el fondo?

Porque el color del texto no cambia. El texto negro sobre un fondo oscuro reduce el contraste.

P4. ¿Puedo cambiar el color de fondo de los PDF por lotes?

Sí, usar bibliotecas de Python como Spire.PDF es la forma más eficiente de procesar múltiples archivos.

Ver También

PDF-Hintergrundfarbe ändern: Von Weiß zu Benutzerdefiniert oder Dunkel

Weiße Hintergründe in PDFs sind nicht immer ideal. Sie können bei langen Lesesitzungen zu Augenbelastung führen, in Markendokumenten unansehnlich aussehen oder Unvollkommenheiten in gescannten Dateien hervorheben.

In diesem Leitfaden lernen Sie drei praktische Möglichkeiten, die PDF-Hintergrundfarbe zu ändern, einschließlich dauerhafter Änderungen mit Adobe Acrobat Pro, schneller Online-Bearbeitungen und Python-Automatisierung für die Stapelverarbeitung. Ein Bonusabschnitt zeigt auch, wie Sie die Dunkelmodus-Ansicht in Adobe Acrobat aktivieren können, ohne die Datei zu ändern.

Auf dieser Seite:

Warum die PDF-Hintergrundfarbe ändern?

Das Ändern der Hintergrundfarbe einer PDF-Datei kann:

  • Die Lesbarkeit verbessern mit weicheren oder dunkleren Hintergründen.
  • Die visuelle Attraktivität erhöhen für Präsentationen oder Unternehmens-Branding.
  • Gescannte PDFs korrigieren, die gelbe oder graue Hintergründe haben.
  • Die Augenbelastung reduzieren beim Lesen am Bildschirm.

Allerdings reicht es nicht immer aus, nur den Hintergrund zu ändern – der Textkontrast muss zur Gewährleistung der Lesbarkeit erhalten bleiben.

Methode 1 – Verwendung von Acrobat Pro (Professionelle Bearbeitung)

Adobe Acrobat Pro ermöglicht es Ihnen, die PDF-Hintergrundfarbe dauerhaft zu ändern und eine echte Änderung auf Dateiebene zu erstellen, die für alle Leser gilt. Diese Methode ist ideal, um weiße Hintergründe in hellgrau, sanftes Beige oder andere Farben zu ändern, während schwarzer oder dunkler Text vollständig lesbar bleibt.

PDF-Hintergrundfarbe mit Adobe ändern

Schritte zum Ändern der PDF-Hintergrundfarbe mit Adobe

  1. Starten Sie Adobe Acrobat Pro auf Ihrem Computer.
  2. Klicken Sie im oberen Menü auf Werkzeuge und wählen Sie PDF bearbeiten.
  3. In der sekundären Werkzeugleiste, klicken Sie auf MehrHintergrundHinzufügen/Aktualisieren.
  4. Klicken Sie auf Farbe und wählen Sie dann Ihre gewünschte Hintergrundfarbe (z. B. Hellgrau).
  5. Wenden Sie die Änderungen auf alle Seiten an oder wählen Sie bestimmte Seiten aus.
  6. Klicken Sie auf OK und speichern Sie dann das Dokument, um den neuen Hintergrund beizubehalten.

Vorteile

  • Intuitive, benutzerfreundliche Oberfläche.
  • Erhält die Lesbarkeit des Textes.
  • Präzise Farbauswahl pro Seite.

Nachteile

  • Kostenpflichtige Software erforderlich.
  • Nicht für die Stapelverarbeitung geeignet.

Methode 2 – Verwendung eines Online-Tools (Schnell & Kostenlos)

Online-PDF-Tools bieten eine schnelle und bequeme Möglichkeit, Hintergründe zu ändern, ohne Software installieren zu müssen. Sie sind ideal für einfache Bearbeitungen wie Präsentationen oder Marken-Updates, obwohl die meisten die Textfarbe nicht automatisch anpassen.

PDF-Hintergrundfarbe online ändern

Schritte zum Online-Ändern der PDF-Hintergrundfarbe

  1. Öffnen Sie ein vertrauenswürdiges Online-PDF-Tool wie WorkinTool.
  2. Klicken Sie auf PDF hochladen und wählen Sie die Datei von Ihrem Gerät aus.
  3. Suchen Sie das Werkzeug Hintergrundfarbe in der Benutzeroberfläche.
  4. Wählen Sie eine neue Hintergrundfarbe aus der Palette oder geben Sie einen benutzerdefinierten Hex-Code ein.
  5. Wenden Sie die Farbänderung auf alle Seiten an.
  6. Laden Sie die aktualisierte PDF-Datei herunter und überprüfen Sie das Ergebnis, um die Lesbarkeit sicherzustellen.

Vorteile

  • Keine Installation erforderlich.
  • Schnell für kleine Bearbeitungen.
  • Funktioniert auf jedem Gerät.

Nachteile

  • Hat oft eine Dateigrößenbeschränkung.
  • Möglicherweise nicht für vertrauliche Dokumente geeignet.

Methode 3 – Verwendung von Python mit Spire.PDF (Stapelverarbeitung)

Für Entwickler und Unternehmen, die mehrere Dokumente verwalten, bietet Spire.PDF eine effiziente, skalierbare Python-Lösung für die programmatische PDF-Bearbeitung. Diese Bibliothek unterstützt Hintergrundänderungen und Stapelverarbeitung ohne die Notwendigkeit von Adobe Acrobat.

Diese Methode ermöglicht es Ihnen, eine einheitliche Hintergrundfarbe auf Hunderte von Dokumenten anzuwenden, was Zeit spart und Einheitlichkeit gewährleistet.

Python-Bibliothek zum Ändern der PDF-Hintergrundfarbe

Schritte

  1. Installieren Sie Spire.PDF für Python in Ihrer Umgebung (pip install spire.pdf).
  2. Bereiten Sie die zu verarbeitenden PDF-Dateien vor und legen Sie sie in einem Ordner ab.
  3. Öffnen Sie Ihren Python-Editor und erstellen Sie ein Skript, das jede PDF-Datei durchläuft.
  4. Stellen Sie für jede Seite die Hintergrundfarbe auf den gewünschten Farbton ein.
  5. Speichern Sie die geänderte PDF-Datei in einem neuen Ordner, um die Originale zu erhalten.

Beispiel-Python-Code (Stapelverarbeitung)

from spire.pdf.common import *
from spire.pdf import *
import os

# Input and output folders
input_folder = "C:\\Users\\Administrator\\Desktop\\PDFs"
output_folder = "C:\\Users\\Administrator\\Desktop\\Output"

# Loop through all PDF files in the input folder
for filename in os.listdir(input_folder):
    if filename.endswith(".pdf"):
        file_path = os.path.join(input_folder, filename)

        # Load the PDF
        doc = PdfDocument()
        doc.LoadFromFile(file_path)

        # Change background color for all pages
        for i in range(doc.Pages.Count):
            page = doc.Pages.get_Item(i)
            page.BackgroundColor = Color.get_LightYellow()

        # Save updated PDF to output folder
        output_path = os.path.join(output_folder, filename)
        doc.SaveToFile(output_path)

Vorteile

  • Automatisiert die Massenverarbeitung.
  • Konsistente Ergebnisse über mehrere PDFs hinweg.
  • Ideal für Branding oder Workflow-Automatisierung.

Nachteile

  • Kann vorhandenen Text nicht automatisch neu einfärben.
  • Erfordert grundlegende Python-Kenntnisse.

Tipp: Verwenden Sie diese Methode für Stapel-Updates, aber für eine echte Lesbarkeit im Dunkelmodus sind Anpassungen der Textfarbe erforderlich.

Weiterlesen: Hintergrundfarbe oder -bild für PDF mit Python festlegen

Bewährte Verfahren zur Aufrechterhaltung der Lesbarkeit

Beachten Sie beim Ändern von PDF-Hintergründen die folgenden Richtlinien:

  • Verwenden Sie kontrastreiche Kombinationen: dunkler Text auf hellem Hintergrund oder heller Text auf dunklem Hintergrund.
  • Vermeiden Sie reines Schwarz (#000000) für den Hintergrund, um die Augenbelastung zu reduzieren.
  • Halten Sie die Textfarben nach Hintergrundänderungen lesbar.
  • Testen Sie Dokumente auf verschiedenen Geräten oder PDF-Readern, um die Konsistenz zu gewährleisten.
  • Bei gescannten PDFs sollten Sie vor dem Anwenden der Hintergrundfarbe eine Rauschunterdrückung und Kontrastverbesserung in Betracht ziehen.

Tipp: Dezente Farbtöne wie Hellgrau (#f2f2f2) eignen sich gut in professionellen Kontexten, ohne den Leser zu überfordern oder das Scannen von Text zu erschweren.

Bonus – Dunkelmodus-Ansicht in Adobe Acrobat (Betrachter-Ebene)

Wenn Ihr Ziel bequemes Lesen am Bildschirm ist, bietet Adobe Acrobat einen Dunkelmodus auf Betrachter-Ebene. Diese Methode ändert die PDF-Datei nicht, sondern simuliert den Dunkelmodus, indem sie die Hintergrund- und Textfarben im Reader ändert.

Dunkelmodus-Ansicht in Adobe

Schritte

  1. Starten Sie Adobe Acrobat auf Ihrem Computer.
  2. Gehen Sie zu BearbeitenVoreinstellungenBarrierefreiheit.
  3. Aktivieren Sie Dokumentfarben ersetzen.
  4. Wählen Sie Benutzerdefinierte Farbe und stellen Sie dann ein:
    • Seitenhintergrund → Dunkelgrau
    • Dokumenttext → Hellgrau oder Weiß
  5. Klicken Sie auf OK und sehen Sie sich Ihre PDF im Dunkelmodus an.

Hinweis: Änderungen gelten nur in Ihrem Acrobat Reader. Die ursprüngliche PDF-Datei bleibt unverändert.

Fazit

Das Ändern der Hintergrundfarbe von PDFs verbessert sowohl die Lesbarkeit als auch die Ästhetik. Die Wahl der richtigen Methode hängt von Ihren Zielen ab:

  • Adobe Acrobat Pro: Am besten für Benutzer, die eine einfach zu bedienende, professionelle Oberfläche zur Bearbeitung von Hintergründen mit präziser Steuerung wünschen.
  • Online-Tools: Schnell und praktisch für einmalige Bearbeitungen oder Präsentationsdateien.
  • Python (Spire.PDF): Ideal für die Stapelverarbeitung, Automatisierung und Gewährleistung eines einheitlichen Stils über mehrere Dokumente hinweg.
  • Bonus Dunkelmodus auf Betrachter-Ebene: Nützlich für den persönlichen Lesekomfort, ohne die PDF-Datei zu verändern.

Bei gescannten PDFs ist die alleinige Anpassung der Hintergrundfarbe möglicherweise nicht ausreichend – erwägen Sie, Hintergrundänderungen mit Kontrastverbesserung oder Rauschunterdrückung zu kombinieren, um optimale Ergebnisse zu erzielen. Durch die Wahl der geeigneten Methode und die Anwendung bewährter Verfahren können Sie PDFs erstellen, die sowohl optisch ansprechend als auch auf allen Geräten und in allen Umgebungen leicht zu lesen sind.

FAQs

F1. Kann ich die PDF-Hintergrundfarbe kostenlos ändern?

Ja, Online-Tools können dies kostenlos tun, aber sie haben oft Einschränkungen in Bezug auf Qualität und Funktionen.

F2. Wie mache ich eine PDF dauerhaft zum Dunkelmodus?

Die meisten Tools unterstützen keinen echten permanenten Dunkelmodus. Sie müssten sowohl die Hintergrund- als auch die Textfarben ändern, was mit Standard-Tools nicht einfach zu erreichen ist.

F3. Warum wird mein Text nach dem Ändern des Hintergrunds schwer lesbar?

Weil die Textfarbe unverändert bleibt. Schwarzer Text auf dunklem Hintergrund reduziert den Kontrast.

F4. Kann ich die PDF-Hintergrundfarbe im Stapel ändern?

Ja, die Verwendung von Python-Bibliotheken wie Spire.PDF ist der effizienteste Weg, um mehrere Dateien zu verarbeiten.

Siehe auch

Изменить цвет фона PDF: с белого на пользовательский или темный

Белый фон в PDF-файлах не всегда идеален. Он может вызывать напряжение глаз при длительном чтении, выглядеть непривлекательно в фирменных документах или подчеркивать несовершенства отсканированных файлов.

В этом руководстве вы узнаете три практических способа изменить цвет фона PDF, включая постоянные изменения с помощью Adobe Acrobat Pro, быстрые онлайн-редактирования и автоматизацию с помощью Python для пакетной обработки. В бонусном разделе также показано, как включить просмотр в темном режиме в Adobe Acrobat без изменения файла.

На этой странице:

Зачем менять цвет фона PDF?

Изменение цвета фона PDF может:

  • Улучшить читабельность с помощью более мягких или темных фонов.
  • Улучшить визуальную привлекательность для презентаций или корпоративного брендинга.
  • Исправить отсканированные PDF-файлы с желтым или серым фоном.
  • Снизить напряжение глаз при чтении с экрана.

Однако простого изменения фона не всегда достаточно — для читабельности необходимо сохранить контрастность текста.

Метод 1 — Использование Acrobat Pro (профессиональное редактирование)

Adobe Acrobat Pro позволяет навсегда изменить цвет фона PDF, создавая истинное изменение на уровне файла, которое применяется для всех читателей. Этот метод идеален для изменения белого фона на светло-серый, мягкий бежевый или другие цвета, сохраняя при этом полную читабельность черного или темного текста.

Изменить цвет фона PDF с помощью Adobe

Шаги по изменению цвета фона PDF с помощью Adobe

  1. Запустите Adobe Acrobat Pro на своем компьютере.
  2. Нажмите Инструменты в верхнем меню и выберите Редактировать PDF .
  3. На вторичной панели инструментов нажмите БольшеФонДобавить/Обновить .
  4. Нажмите Цвет , затем выберите желаемый цвет фона (например, светло-серый).
  5. Примените изменения ко всем страницам или выберите определенные страницы.
  6. Нажмите OK , затем сохраните документ, чтобы сохранить новый фон.

Плюсы

  • Интуитивно понятный, удобный интерфейс.
  • Сохраняет читабельность текста.
  • Точный выбор цвета для каждой страницы.

Минусы

  • Требуется платное программное обеспечение.
  • Не подходит для пакетной обработки.

Метод 2 — Использование онлайн-инструмента (быстро и бесплатно)

Онлайн-инструменты для PDF предлагают быстрый и удобный способ изменения фона без установки программного обеспечения. Они идеально подходят для простых правок, таких как презентации или обновления брендинга, хотя большинство из них не корректируют цвет текста автоматически.

Изменить цвет фона PDF онлайн

Шаги по изменению цвета фона PDF онлайн

  1. Откройте надежный онлайн-инструмент для PDF, например WorkinTool.
  2. Нажмите Загрузить PDF и выберите файл с вашего устройства.
  3. Найдите инструмент Цвет фона в интерфейсе.
  4. Выберите новый цвет фона из палитры или введите пользовательский шестнадцатеричный код.
  5. Примените изменение цвета ко всем страницам.
  6. Загрузите обновленный PDF и просмотрите результат, чтобы убедиться в читабельности.

Плюсы

  • Установка не требуется.
  • Быстро для небольших правок.
  • Работает на любом устройстве.

Минусы

  • Часто имеет ограничение на размер файла.
  • Может не подходить для конфиденциальных документов.

Метод 3 — Использование Python с Spire.PDF (пакетная обработка)

Для разработчиков и компаний, управляющих несколькими документами, Spire.PDF предлагает эффективное, масштабируемое решение на Python для программного редактирования PDF. Эта библиотека поддерживает изменение фона и пакетную обработку без необходимости использования Adobe Acrobat.

Этот метод позволяет применять единый цвет фона к сотням документов, экономя время и обеспечивая единообразие.

Библиотека Python для изменения цвета фона PDF

Шаги

  1. Установите Spire.PDF для Python в вашей среде (pip install spire.pdf).
  2. Подготовьте PDF-файлы, которые вы хотите обработать, и поместите их в папку.
  3. Откройте ваш редактор Python и создайте скрипт для перебора каждого PDF-файла.
  4. Для каждой страницы установите желаемый оттенок фона.
  5. Сохраните измененный PDF в новую папку, чтобы сохранить оригиналы.

Пример кода на Python (пакетная обработка)

from spire.pdf.common import *
from spire.pdf import *
import os

# Входная и выходная папки
input_folder = "C:\\Users\\Administrator\\Desktop\\PDFs"
output_folder = "C:\\Users\\Administrator\\Desktop\\Output"

# Перебор всех PDF-файлов во входной папке
for filename in os.listdir(input_folder):
    if filename.endswith(".pdf"):
        file_path = os.path.join(input_folder, filename)

        # Загрузка PDF
        doc = PdfDocument()
        doc.LoadFromFile(file_path)

        # Изменение цвета фона для всех страниц
        for i in range(doc.Pages.Count):
            page = doc.Pages.get_Item(i)
            page.BackgroundColor = Color.get_LightYellow()

        # Сохранение обновленного PDF в выходную папку
        output_path = os.path.join(output_folder, filename)
        doc.SaveToFile(output_path)

Плюсы

  • Автоматизирует массовую обработку.
  • Согласованные результаты для нескольких PDF-файлов.
  • Идеально для брендинга или автоматизации рабочих процессов.

Минусы

  • Не может автоматически перекрашивать существующий текст.
  • Требуются базовые знания Python.

Совет: Используйте этот метод для пакетных обновлений, но для истинной читабельности в темном режиме необходима корректировка цвета текста.

Читать далее : Установить цвет фона или изображение для PDF с помощью Python

Лучшие практики для сохранения читабельности

При изменении фона PDF следуйте этим рекомендациям:

  • Используйте высококонтрастные сочетания: темный текст на светлом фоне или светлый текст на темном фоне.
  • Избегайте чисто черного (#000000) фона, чтобы уменьшить напряжение глаз.
  • Сохраняйте читабельность цветов текста после изменения фона.
  • Тестируйте документы на разных устройствах или в разных программах для чтения PDF, чтобы обеспечить согласованность.
  • Для отсканированных PDF-файлов рассмотрите возможность шумоподавления и повышения контрастности перед применением цвета фона.

Совет: Нежные оттенки, такие как светло-серый (#f2f2f2), хорошо работают в профессиональном контексте, не перегружая читателя и не затрудняя сканирование текста.

Бонус — просмотр в темном режиме в Adobe Acrobat (на уровне просмотра)

Если ваша цель — комфортное чтение с экрана, Adobe Acrobat предлагает темный режим на уровне просмотра. Этот метод не изменяет PDF-файл, а имитирует темный режим, изменяя цвета фона и текста в программе для чтения.

Просмотр в темном режиме в Adobe

Шаги

  1. Запустите Adobe Acrobat на своем компьютере.
  2. Перейдите в РедактированиеНастройкиДоступность .
  3. Включите Заменить цвета документа .
  4. Выберите Пользовательский цвет , затем установите:
    • Фон страницы → темно-серый
    • Текст документа → светло-серый или белый
  5. Нажмите OK и просмотрите ваш PDF в темном режиме.

Примечание: Изменения применяются только в вашем Acrobat Reader. Исходный PDF-файл остается неизменным.

Заключение

Изменение цвета фона PDF-файлов улучшает как читабельность, так и эстетику. Выбор правильного метода зависит от ваших целей:

  • Adobe Acrobat Pro: Лучше всего подходит для пользователей, которым нужен простой в использовании профессиональный интерфейс для редактирования фонов с точным контролем.
  • Онлайн-инструменты: Быстро и удобно для разовых правок или файлов презентаций.
  • Python (Spire.PDF): Идеально подходит для пакетной обработки, автоматизации и обеспечения единообразного стиля для нескольких документов.
  • Бонусный темный режим на уровне просмотра: Полезен для личного комфортного чтения без изменения PDF-файла.

Для отсканированных PDF-файлов одного лишь изменения цвета фона может быть недостаточно — рассмотрите возможность сочетания изменений фона с повышением контрастности или удалением шума для достижения оптимальных результатов. Выбрав подходящий метод и применяя лучшие практики, вы можете создавать PDF-файлы, которые будут одновременно визуально привлекательными и легко читаемыми на разных устройствах и в разных средах.

Часто задаваемые вопросы

В1. Могу ли я изменить цвет фона PDF бесплатно?

Да, онлайн-инструменты могут сделать это бесплатно, но они часто имеют ограничения по качеству и функциям.

В2. Как сделать PDF постоянно в темном режиме?

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

В3. Почему мой текст становится трудночитаемым после изменения фона?

Потому что цвет текста остается неизменным. Черный текст на темном фоне снижает контрастность.

В4. Могу ли я пакетно изменять цвет фона PDF?

Да, использование библиотек Python, таких как Spire.PDF, является наиболее эффективным способом обработки нескольких файлов.

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

Convert Word to OFD in C++

Converting Word documents to OFD (Open Fixed-layout Document) is a common requirement in many C++ applications, especially for projects serving the Chinese market, where OFD is a national standard for fixed-layout electronic documents in China (GB/T 33190). Whether you're building backend services, report generators, or document processing systems, implementing reliable C++ conversion Word to OFD functionality helps ensure documents can be shared, archived, or submitted to government systems while preserving their original formatting. However, implementing this feature isn't always easy. Traditional solutions often depend on Microsoft Office automation, which can introduce deployment issues and isn't ideal for server-side environments.

In this article, we'll demonstrate how to use Spire.Doc for C++ to convert Word to OFD programmatically. We'll cover basic document conversion as well as more advanced scenarios such as exporting specific pages to OFD format.


Why Convert Word to OFD?

Although Word documents are convenient for editing, OFD is often preferred for official document archiving and distribution in China. Converting Word to OFD offers several advantages:

  • National standard compliance: OFD is China's national standard for fixed-layout electronic documents, making it essential for government submissions and official archives.
  • Consistent layout: OFD preserves the original formatting, ensuring the document looks the same across devices and operating systems.
  • Document standardization: OFD files are designed to ensure consistent rendering across different platforms and viewers.
  • Long-term archiving: OFD is well-suited for archiving and official record-keeping, making it ideal for legal and financial records.
  • Improved document integrity: OFD files support digital signatures and document integrity protection, making them more resistant to tampering.
  • Automation support: Applications can convert Word to OFD programmatically in document workflows.

Why Choose Spire.Doc for C++

There are a few ways to approach converting Word to OFD in C++ - COM automation, shelling out to external tools, or parsing the .docx format manually. Each comes with trade-offs: platform lock-in, environment dependencies, or significant implementation overhead.

Spire.Doc for C++ sidesteps most of these issues:

  • No Office installation required - the library handles conversion internally, which makes it viable for server-side deployment
  • Cross-platform - works on both Windows and Linux, which matters if your service runs in a containerized or Linux-based environment
  • Faithful formatting - tables, images, headers, footers, and font styles are preserved reliably in the output OFD
  • Straightforward API - the core conversion logic is concise, without needing to understand the full document object model upfront
  • Support several Word document formats - including DOC, DOCX, DOCM, DOTX / DOTM.

It's not a perfect tool for every edge case, but for most production conversion needs, it covers the ground well.


Setting Up Spire.Doc for C++

Before starting the conversion, make sure your development environment and project are properly configured.

Install via NuGet Package Manager

  • Open your project in Visual Studio.
  • Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution...
  • Search for "Spire.Doc.Cpp".
  • Click "Install".

Manual Installation

  • Download the latest version of Spire.Doc for C++ from the official website.
  • Unzip the package.
  • Configure your Visual Studio project to include the Include directory path and link the lib directory. Ensure the DLL files are placed in the same directory as your executable or in a system path.

For detailed installation instructions, see: Integrate Spire.Doc for C++ in a C++ Application

Basic C++ Project Setup

Once installed, make sure the following are in place before writing any code:

Include the header:

#include "Spire.Doc.o.h"

Add the required using namespace:

using namespace Spire::Doc;

Basic Word to OFD Conversion in C++

Once the project is ready, converting a Word document to OFD only requires a few lines of code.

Here is a complete C++ example:

#include "Spire.Doc.o.h"
#include <iostream>

using namespace Spire::Doc;

int main()
{
    Document* document = new Document();

    try {
        document->LoadFromFile(L"C:\\Users\\Tommy\\Desktop\\BusinessReport.docx");

        document->SaveToFile(L"C:\\Users\\Tommy\\Desktop\\BusinessReport.ofd", FileFormat::OFD);

        document->Close();

        std::cout << "success!" << std::endl;

    }
    catch (const std::exception& ex) {
        std::cerr << "error: " << ex.what() << std::endl;
        delete document;
        return -1;
    }

    delete document;
    return 0;
}

Key Code Explanations:

  • Create a Document object.
  • LoadFromFile() loads the Word document.
  • SaveToFile() converts and saves the document as an OFD file using FileFormat::OFD.

Word to OFD conversion result:

C++ Convert Word to OFD


Advanced Word to OFD Conversion Settings

Beyond basic Word-to-OFD conversion, Spire.Doc for C++ also provides options for more specific needs. For example, you can export specific pages to OFD or customize the conversion process by adjusting image compression and embedding fonts.

Convert Specific Pages to OFD

In some workflows, you may only need to convert specific pages of a Word document to OFD format. The following example demonstrates how to extract specific pages and save them as a separate OFD file.

Code example:

#include "Spire.Doc.o.h"
#include <iostream>

using namespace Spire::Doc;

int main()
{
    intrusive_ptr<Document> document = new Document();

    try {
        document->LoadFromFile(L"C:\\Users\\Tommy\\Desktop\\Agreement.docx");

        // Extract pages 1-3 (page index starts from 0)
        intrusive_ptr<Document> newDoc = document->ExtractPages(0, 3);

        newDoc->SaveToFile(L"C:\\Users\\Tommy\\Desktop\\Agreement_Partial.ofd", FileFormat::OFD);

        document->Close();
        newDoc->Close();

        std::cout << "Partial OFD Success!" << std::endl;

    }
    catch (const std::exception& ex) {
        std::cerr << "error: " << ex.what() << std::endl;
        return -1;
    }

    return 0;
}

C++ Convert Specific Pages to OFD

Code Explanation:

  • intrusive_ptr is a smart pointer that automatically manages the memory of the Document object, ensuring it is properly destroyed when no longer needed, which helps prevent memory leaks and simplifies code.
  • ExtractPages(0, 3) — Extracts pages 1-3 (0-based index) into a new Document.
  • Saving the new document with FileFormat::OFD generates an OFD file containing only the selected pages.

Customize OFD Conversion Settings

In some situations, you may want to adjust conversion settings-for example, to reduce the size of the generated OFD or ensure fonts display correctly across different systems. Spire.Doc for C++ provides options for customizing the export process.

The code below shows how to enable image compression and font embedding during conversion.

#include "Spire.Doc.o.h"
#include <iostream>

using namespace Spire::Doc;

int main()
{
    intrusive_ptr<Document> document = new Document();

        try {
            document->LoadFromFile(L"C:\\Users\\Tommy\\Desktop\\MarketingProposal.docx");

            document->SetJPEGQuality(75);

            intrusive_ptr<ToPdfParameterList> parameters = new ToPdfParameterList();
            parameters->SetIsEmbeddedAllFonts(true);

            document->SaveToFile(L"C:\\Users\\Tommy\\Desktop\\MarketingProposal.ofd", FileFormat::OFD);
            document->Close();

            std::cout << "success" << std::endl;
        }
        catch (const std::exception& ex) {
            std::cerr << "error: " << ex.what() << std::endl;
            return -1;
        }
        return 0;
}

C++ Customize OFD Conversion

  • SetJPEGQuality(75) sets the compression quality of JPEG images in the document to 75%. (value range 0-100).
  • SetIsEmbeddedAllFonts(true) embeds all fonts used in the document, ensuring the OFD displays correctly even if the viewer's system does not have those fonts installed.

Frequently Asked Questions

Q1. Do I need Microsoft Word installed to perform the conversion?

A: No. Spire.Doc for C++ works independently of Microsoft Office and does not require Word to be installed on the system.

Q2. How can I convert only specific pages of a Word document to OFD?

A: As mentioned previously, you can extract the required pages from the document using intrusive_ptr<Document> newDoc = document->ExtractPages();, and then save the extracted content as an OFD file. Alternatively, you can copy the desired sections into a new document and then perform the conversion.

Q3. Why do some fonts appear different in the converted OFD?

A: This usually happens when the required fonts are not installed on the system. You can enable this by calling SetIsEmbeddedAllFonts(true) before saving the document.

Q4. How can I reduce the size of the generated OFD?

A: You can enable image compression or lower the JPEG quality (SetJPEGQuality(75))during the conversion process to reduce the file size.

Q5. What is the difference between OFD and PDF?

A: OFD (Open Fixed-layout Document) is China's national standard for electronic documents, while PDF is an international standard. OFD is widely adopted in China for e-government and official document workflows. Both formats preserve document layout and formatting.


Conclusion

Implementing a C++ conversion of Word documents to OFD is essential for applications that require reliable document sharing, archiving, or compliance with Chinese national standards. With Spire.Doc for C++, developers can perform Word-to-OFD conversion programmatically without relying on Microsoft Office automation. As demonstrated in this guide, the library supports not only full document conversion but also advanced scenarios such as exporting specific pages and customizing conversion settings, making it a practical solution for C++ document processing tasks.

Os 5 melhores métodos para dividir o conteúdo de uma célula no Excel

Dominar como dividir uma célula no Excel é uma das habilidades de limpeza de dados mais essenciais para quem trabalha com planilhas. Todos nós já passamos por isso: colar dados no Excel e descobrir que cada pedaço de informação está amontoado em uma única coluna, transformando nomes, endereços, e-mails e códigos de produtos em uma bagunça que é inútil para classificar, filtrar ou fazer análises significativas.

Embora o Excel não permita dividir fisicamente uma única célula em duas células menores na mesma coluna, ele oferece ferramentas poderosas para dividir o conteúdo de uma célula em várias colunas adjacentes. Neste guia, vamos detalhar os 5 melhores métodos para dividir dados de células no Excel — desde ferramentas fáceis para iniciantes, como o Preenchimento Automático (Flash Fill), até fluxos de trabalho automatizados com o Power Query e Python.

Você aprenderá:

Ao final, você será capaz de transformar dados bagunçados e inutilizáveis em planilhas prontas para análise em minutos.


O que significa "Dividir uma Célula" no Excel?

No Excel, a frase "dividir uma célula" pode ser confusa porque você não pode dividir fisicamente uma única célula. Em vez disso, o termo se refere a duas ações diferentes:

  1. Dividir o conteúdo de uma célula: Pegar os dados dentro de uma célula e distribuí-los por várias células adjacentes (por exemplo, separar "João Silva" em "João" em uma coluna e "Silva" na seguinte).
  2. Dividir uma célula mesclada: Desfazer uma mesclagem para restaurar as células individuais originais.

Este guia foca na primeira e mais comum tarefa: dividir dados de células no Excel.


Método 1: Dividir Célula com a Função "Texto para Colunas" do Excel

Texto para Colunas é uma ferramenta integrada do Excel que permite dividir o texto de uma célula ou coluna em duas ou mais colunas separadas. Funciona tanto para dados delimitados (texto separado por vírgulas, espaços ou outros caracteres) quanto para dados de largura fixa (texto com espaçamento consistente). Veja como usar cada um:

Opção A: Dividir Célula no Excel por Delimitador

Este método é perfeito para dividir dados como arquivos CSV ou listas onde os itens são separados por um símbolo consistente.

  • Selecione as células ou a coluna que você deseja dividir.
  • Vá para a guia Dados → clique em Texto para Colunas (no grupo Ferramentas de Dados).

Guia Dados do Excel com o botão Texto para Colunas

  • No Assistente para Converter Texto em Colunas:
    • Selecione Delimitado → clique em Avançar.
    • Marque a caixa ao lado do seu delimitador (por exemplo, Vírgula, Espaço ou Tabulação) → clique em Avançar.
    • Escolha um Destino (onde colocar os dados divididos — por exemplo, $C$1 para começar na coluna C).
    • Selecione os formatos das colunas (por exemplo, Geral para texto/números, Texto para números de telefone)
    • Clique em Concluir. Seus dados agora estão divididos em colunas separadas.

Dividir texto em colunas separadas com base no delimitador

Dica Profissional: Ao selecionar o delimitador, você pode marcar múltiplos delimitadores, se necessário (por exemplo, vírgula + espaço). Se o seu delimitador não estiver listado, selecione Outro e digite o caractere (por exemplo, um hífen “-” ou uma barra vertical “|”).

Opção B: Dividir Texto no Excel por Largura Fixa

Este método é ideal para dados alinhados com espaçamento uniforme (por exemplo, códigos de produtos, IDs formatados):

  • Siga os passos 1-2 acima (selecione as células → Dados → Texto para Colunas).
  • No Assistente para Converter Texto em Colunas:
    • Selecione Largura fixa → clique em Avançar.
    • Clique para adicionar linhas de quebra, arraste para ajustar as posições ou clique duas vezes para excluir linhas → clique em Avançar.

Assistente para Converter Texto em Colunas com uma linha de quebra de largura fixa adicionada na visualização de dados

  • Escolha um destino e os formatos das colunas → clique em Concluir.

Os dados divididos ficam assim:

Colunas do Excel antes e depois de uma divisão por largura fixa

Expandir: Se você tem uma lista dentro de uma célula e quer dividir a célula em várias linhas, pode combinar o Texto para Colunas com o recurso Transpor do Excel.


Método 2: Dividir Célula com o Preenchimento Automático (Flash Fill)

O Preenchimento Automático (Flash Fill) é a ferramenta "mágica" do Excel para divisões simples com um clique. Ele reconhece os padrões que você define e autocompleta o resto. Sem menus ou fórmulas, perfeito para extrair primeiros nomes, números de telefone, códigos de área ou padrões personalizados.

Como Usar o Preenchimento Automático para Dividir Células no Excel

Cenário: Extrair os primeiros nomes de uma lista de nomes completos na coluna A.

  • Digite o primeiro resultado da divisão na célula ao lado dos seus dados. Por exemplo, se a célula A1 contiver “Liam Johnson”, digite “Liam” em B1.
  • Clique na célula B1 (aquela com o seu exemplo).
  • Vá para a guia Dados → clique em Preenchimento Automático (ou use o atalho Ctrl + E no Windows).
  • O Excel preencherá automaticamente o resto da coluna com os primeiros nomes divididos. Repita para os sobrenomes, se necessário.

Planilha do Excel usando o Preenchimento Automático para extrair os primeiros nomes de uma lista de nomes completos


Método 3: Dividir Célula com Fórmulas

Para divisões flexíveis e dinâmicas (por exemplo, atualizar o resultado da divisão automaticamente quando os dados originais mudam), use a fórmula de divisão no Excel. As fórmulas mais comuns são ESQUERDA, DIREITA e TEXTSPLIT (Excel 365/2021+).

Extrair Texto Antes de um Delimitador (ESQUERDA + PROCURAR)

Use esta fórmula para dividir o texto antes de um caractere específico (por exemplo, um espaço ou uma vírgula).

=ESQUERDA(A1; PROCURAR(" "; A1) - 1)

  • PROCURAR(" "; A1): Encontra o número da posição do primeiro espaço.
  • -1: Remove o próprio espaço, para que você obtenha “Liam” em vez de “Liam ”.

Fórmula de divisão de texto ESQUERDA do Excel para extrair o primeiro nome da célula A1

Extrair Texto Depois de um Delimitador (DIREITA + NÚM.CARACT + PROCURAR)

Use esta fórmula para dividir o texto após um caractere específico (parte direita):

=DIREITA(A1; NÚM.CARACT(A1) - PROCURAR(" "; A1))

  • NÚM.CARACT(A1): Obtém o comprimento total do texto.
  • Subtraia a posição do espaço para obter o texto restante.
  • Nota: Esta fórmula funciona apenas para casos de delimitador único (por exemplo, um espaço ou uma vírgula). Ela extrai todo o texto após o primeiro delimitador como um único bloco e não consegue lidar com múltiplos delimitadores.

Fórmula de divisão de texto DIREITA do Excel para extrair o sobrenome da célula A1

Se você estiver usando o Microsoft 365, pode usar a fórmula TEXTSPLIT para dividir o texto por um delimitador e despejar os resultados em células adjacentes automaticamente.


Método 4: Dividir Célula com o Power Query

O Power Query é a melhor ferramenta para divisões de dados em massa ou atualizações automatizadas (por exemplo, importar novos dados semanalmente). Ele mantém seus dados originais intactos e permite que você atualize os resultados da divisão com um clique — essencial para pipelines de dados e limpeza regular de dados.

Passo a Passo: Dividir Colunas no Excel com o Power Query

  • Selecione seu intervalo de dados → vá para a guia Dados → clique em Da Tabela/Intervalo (o Power Query será aberto).

  • No Editor do Power Query, selecione a coluna que você deseja dividir.

  • Clique no menu suspenso Dividir Coluna e selecione uma opção:

    • Por Delimitador: Dividir por vírgulas, espaços ou caracteres personalizados.
    • Pelo Número de Caracteres: Dividir dados de comprimento fixo.
    • Por Posições: Dividir em posições de caracteres específicas.
    • De Minúscula para Maiúscula: Divide quando uma letra minúscula é seguida por uma maiúscula (por exemplo, "AirPlane" → "Air", "Plane").
    • De Maiúscula para Minúscula: Divide quando uma letra maiúscula é seguida por uma minúscula (por exemplo, "iPhone" → "i", "Phone").
    • De Dígito para Não Dígito: Divide quando um número é seguido por texto (por exemplo, "123Shoes" → "123", "Shoes").
    • De Não Dígito para Dígito: Divide quando um texto é seguido por um número (por exemplo, "Shoes123" → "Shoes", "123")
  • Selecione suas configurações de divisão → clique em OK.

  • Clique em Fechar e Carregar para exportar os dados divididos para uma nova planilha.

Editor do Power Query com o menu suspenso Dividir Coluna mostrando as opções de divisão

Depois de dividir e organizar seus dados, o próximo passo geralmente é a desduplicação. Descubra como identificar e remover duplicatas no Excel para garantir que sua análise seja precisa.


Método 5: Dividir Célula com Python

Para usuários que precisam automatizar a divisão de células em escala ou integrar a divisão em um fluxo de trabalho Python, a biblioteca Free Spire.XLS for Python é uma solução robusta baseada em código. Funciona em todos os formatos de arquivo do Excel (.xlsx, .xls) e não requer interação manual com o Excel.

Código Python para Separar Célula no Excel

Este código divide o conteúdo da célula em colunas adjacentes. Ele lê um arquivo Excel de entrada, processa a coluna A e escreve os resultados da divisão em colunas adjacentes em um novo arquivo de saída:

from spire.xls import *
from spire.xls.common import *

# Crie um objeto da classe Workbook
workbook = Workbook()
# Carregue o arquivo Excel
workbook.LoadFromFile("Data.xlsx")

# Obtenha a primeira planilha do arquivo
sheet = workbook.Worksheets[0]

# Percorra cada linha da planilha
for i in range(sheet.LastRow):
    # Obtenha o texto da primeira célula na linha atual
    text = sheet.Range[i + 1, 1].Text
    # Divida o texto por vírgula
    splitText = text.split(',')
    # Escreva os dados divididos em colunas individuais
    for j in range(len(splitText)):
        sheet.Range[i + 1, j + 2].Text = splitText[j]

# Ajuste automaticamente a largura das colunas na planilha
sheet.AllocatedRange.AutoFitColumns()

# Salve o arquivo Excel modificado
workbook.SaveToFile("TextToColumns.xlsx", ExcelVersion.Version2016)
workbook.Dispose()

Explicações Chave do Código:

  • Workbook() / LoadFromFile(): Inicializa o manipulador de arquivos do Excel e carrega seu arquivo de origem.
  • LastRow: Obtém o número total de linhas com dados (evita percorrer linhas vazias).
  • split(','): Divide o conteúdo da célula por vírgulas (altere o delimitador conforme necessário).
  • sheet.Range[i + 1, j + 2].Text: Escreve os valores divididos a partir da coluna B (índice 2) para evitar a sobreposição dos dados originais nas colunas A.
  • SaveToFile(): Exporta os resultados para um novo arquivo.

O resultado da divisão do texto da célula em colunas:

Dividir o conteúdo de uma célula em várias colunas usando Python

Depois de dividir o conteúdo da célula em colunas estruturadas, aplique a validação de dados às novas colunas para garantir a entrada de dados consistente (por exemplo, formatos numéricos para CEPs).


Dicas Profissionais para Dividir uma Célula no Excel

  1. Faça Backup dos Seus Dados: Sempre faça uma cópia dos seus dados originais antes de dividir. Algumas ações de divisão são difíceis de desfazer.
  2. Limpe os Dados Primeiro: Remova espaços extras ou caracteres ocultos antes de dividir para evitar erros.
  3. Insira Colunas em Branco: Adicione colunas em branco suficientes à direita dos seus dados para evitar que os resultados da divisão substituam o conteúdo existente.
  4. Verifique a Visualização dos Dados: Sempre olhe a visualização dos dados no assistente de Texto para Colunas e no Power Query antes de finalizar. Isso ajuda a identificar erros de delimitador antecipadamente.

Considerações Finais

Dominar como dividir uma célula no Excel é uma habilidade fundamental que transforma dados bagunçados em um ativo estruturado e poderoso. Seja você um iniciante usando o Preenchimento Automático/Texto para Colunas, um analista avançado construindo pipelines no Power Query, ou um usuário experiente automatizando a divisão de células do Excel em massa com Python, agora você tem um kit de ferramentas completo para qualquer desafio de limpeza de dados.

Comece com o método que parecer mais confortável e experimente as opções mais avançadas à medida que suas necessidades aumentarem. Com essas técnicas, você economizará inúmeras horas e desbloqueará todo o potencial de seus dados para análise e tomada de decisões.


Perguntas Frequentes: Como Separar uma Célula no Excel

P1. Posso dividir uma única célula em duas células menores (não apenas o conteúdo)?

Não. O Excel não permite dividir fisicamente uma única célula não mesclada em duas células menores na mesma coluna. A estrutura da grade é fixa.

P2. Por que a opção Texto para Colunas está desativada?

A ferramenta fica desativada se:

  • Sua planilha estiver protegida (desproteja via Revisão → Desproteger Planilha).
  • Você tiver células mescladas (desfaça a mesclagem via Página Inicial → Mesclar e Centralizar → Desfazer Mesclagem de Células).
  • Você estiver editando uma célula (pressione Enter para sair do modo de edição).

P3. Como divido uma célula no Google Sheets?

O Google Sheets usa a função SPLIT (o equivalente ao TEXTSPLIT do Excel) para a maioria das divisões:

  • Divisão básica por delimitador: =SPLIT(A1; ",") (divide por vírgula; substitua por espaço/hífen).
  • Dividir por quebras de linha: =SPLIT(A1; CHAR(10)).
  • Dividir em linhas (não colunas): =TRANSPOSE(SPLIT(A1; ",")).

O Google Sheets também tem um equivalente ao Texto para Colunas: selecione o intervalo → DadosDividir texto em colunas (detecta delimitadores automaticamente ou permite que você escolha um personalizado).

P4. Posso automatizar a divisão de células para relatórios mensais?

Sim. As melhores opções são:

  • Power Query: Configure a divisão uma vez. A cada mês, cole os novos dados na tabela de origem e clique em Atualizar. Esta é a abordagem mais fácil e comum.
  • Python: Escreva um script e agende sua execução usando o Agendador de Tarefas do Windows ou um cron job.

Veja Também

5 Best methods to split cell content in Excel

Excel에서 셀을 분할하는 방법을 마스터하는 것은 스프레드시트로 작업하는 모든 사람에게 가장 필수적인 데이터 정리 기술 중 하나입니다. 우리 모두는 Excel에 데이터를 붙여넣었을 때 모든 정보가 단일 열에 빽빽하게 들어차 이름, 주소, 이메일, 제품 코드가 정렬, 필터링 또는 의미 있는 분석에 쓸모없는 뒤죽박죽이 되는 경험을 해본 적이 있습니다.

Excel에서는 단일 셀을 동일한 열 내에서 두 개의 더 작은 셀로 물리적으로 나눌 수는 없지만, 셀의 내용을 여러 인접한 열에 분할할 수 있는 강력한 도구를 제공합니다. 이 가이드에서는 빠른 채우기와 같은 초보자 친화적인 원클릭 도구부터 파워 쿼리 및 Python을 사용한 자동화된 워크플로우에 이르기까지 Excel에서 셀 데이터를 분할하는 5가지 최고의 방법을 자세히 살펴보겠습니다.

다음 내용을 배우게 됩니다:

이 가이드를 마치면 지저분하고 작업하기 어려운 데이터를 몇 분 만에 분석 준비가 된 스프레드시트로 바꿀 수 있게 될 것입니다.


Excel에서 "셀 분할"이란 무엇을 의미하나요?

Excel에서 "셀 분할"이라는 문구는 단일 셀을 물리적으로 나눌 수 없기 때문에 혼란스러울 수 있습니다. 대신 이 용어는 두 가지 다른 작업을 의미합니다.

  1. 셀 내용 분할: 한 셀 안의 데이터를 가져와 여러 인접 셀에 분배하는 것 (예: "John Smith"를 한 열에는 "John", 다음 열에는 "Smith"로 분리).
  2. 병합된 셀 분할: 병합을 취소하여 원래의 개별 셀로 복원하는 것.

이 가이드는 첫 번째, 더 일반적인 작업인 Excel에서 셀 데이터 분할에 중점을 둡니다.


방법 1: Excel 텍스트 나누기를 사용하여 셀 분할

텍스트 나누기는 셀 또는 열의 텍스트를 두 개 이상의 개별 열로 분할할 수 있는 Excel의 기본 제공 도구입니다. 구분 기호로 분리된 데이터(쉼표, 공백 또는 기타 문자로 구분된 텍스트)와 고정 너비 데이터(일관된 간격의 텍스트) 모두에 작동합니다. 각각의 사용 방법은 다음과 같습니다.

옵션 A: 구분 기호로 셀 분할

이 방법은 CSV 파일과 같은 데이터를 분할하거나 항목이 일관된 기호로 구분된 목록에 적합합니다.

  • 분할하려는 셀 또는 열을 선택합니다.
  • 데이터 탭으로 이동 → 텍스트 나누기(데이터 도구 그룹 내)를 클릭합니다.

Excel Data tab with the Text to Columns button

  • 텍스트 나누기 마법사에서:
    • 구분 기호로 분리됨을 선택 → 다음을 클릭합니다.
    • 구분 기호 옆의 확인란을 선택합니다(예: 쉼표, 공백 또는 ) →다음을 클릭합니다.
    • 대상을 선택합니다(분할된 데이터를 배치할 위치—예: C열에서 시작하려면 $C$1).
    • 열 서식을 선택합니다(예: 텍스트/숫자는 일반, 전화번호는 텍스트)
    • 마침을 클릭합니다. 이제 데이터가 별도의 열로 분할됩니다.

Split text into separate columns based on delimiter

전문가 팁: 구분 기호를 선택하는 동안 필요한 경우 여러 구분 기호를 선택할 수 있습니다(예: 쉼표 + 공백). 구분 기호가 목록에 없으면 기타를 선택하고 문자(예: 하이픈 “-” 또는 파이프 “|”)를 입력합니다.

옵션 B: 고정 너비로 텍스트 분할

이 방법은 균일한 간격으로 정렬된 데이터(예: 제품 코드, 서식 지정된 ID)에 이상적입니다.

  • 위의 1-2단계를 따릅니다(셀 선택 → 데이터 → 텍스트 나누기).
  • 텍스트 나누기 마법사에서:
    • 고정 너비를 선택 → 다음을 클릭합니다.
    • 분할 선을 추가하려면 클릭하고, 위치를 조정하려면 드래그하고, 선을 삭제하려면 두 번 클릭합니다 → 다음을 클릭합니다.

Text to Columns wizard with a fixed-width split line added in the data preview

  • 대상 및 열 서식을 선택 → 마침을 클릭합니다.

분할된 데이터는 다음과 같습니다:

Excel columns before and after a fixed-width split

확장: 셀 안에 목록이 있고 셀을 여러 행으로 분할하려면 텍스트 나누기와 Excel 행/열 바꿈 기능을 결합할 수 있습니다.


방법 2: 빠른 채우기를 사용하여 셀 분할

빠른 채우기는 Excel의 간단한 원클릭 분할을 위한 "마법" 도구입니다. 사용자가 정의한 패턴을 인식하고 나머지를 자동 완성합니다. 메뉴나 수식이 필요 없으며, 이름, 전화번호, 지역 번호 또는 사용자 지정 패턴을 추출하는 데 적합합니다.

Excel 셀 분할에 빠른 채우기를 사용하는 방법

시나리오: A열의 전체 이름 목록에서 이름을 추출합니다.

  • 데이터 옆 셀에 첫 번째 분할 결과를 입력합니다. 예를 들어, 셀 A1이 “Liam Johnson”이면 B1에 “Liam”을 입력합니다.
  • 셀 B1(예제가 있는 셀)을 클릭합니다.
  • 데이터 탭으로 이동 → 빠른 채우기를 클릭합니다(또는 Windows에서 단축키 Ctrl + E 사용).
  • Excel이 나머지 열을 분할된 이름으로 자동으로 채웁니다. 필요한 경우 성에 대해 반복합니다.

Excel sheet using Flash Fill to extract first names from a full name list


방법 3: 수식을 사용하여 셀 분할

유연하고 동적인 분할(예: 원본 데이터가 변경될 때 분할 결과를 자동으로 업데이트)을 위해서는 Excel에서 분할 수식을 사용합니다. 가장 일반적인 수식은 LEFT, RIGHT 및 TEXTSPLIT(Excel 365/2021 이상)입니다.

구분 기호 앞의 텍스트 추출 (LEFT + SEARCH)

이 수식을 사용하여 특정 문자(예: 공백 또는 쉼표) 앞의 텍스트를 분할합니다.

=LEFT(A1, SEARCH(" ", A1) - 1)

  • SEARCH(" ", A1): 첫 번째 공백의 위치 번호를 찾습니다.
  • -1: 공백 자체를 제거하여 “Liam” 대신 “Liam ”을 얻습니다.

Excel LEFT split text formula to extract the first name from cell A1

구분 기호 뒤의 텍스트 추출 (RIGHT + LEN + SEARCH)

이 수식을 사용하여 특정 문자 뒤의 텍스트를 분할합니다(오른쪽 부분):

=RIGHT(A1, LEN(A1) - SEARCH(" ", A1))

  • LEN(A1): 텍스트의 총 길이를 가져옵니다.
  • 공백의 위치를 빼서 나머지 텍스트를 가져옵니다.
  • 참고: 이 수식은 단일 구분 기호(예: 공백 하나 또는 쉼표 하나)의 경우에만 작동합니다. 첫 번째 구분 기호 뒤의 모든 텍스트를 단일 블록으로 추출하며 여러 구분 기호를 처리할 수 없습니다.

Excel RIGHT split text formula to extract the last name from cell A1

Microsoft 365를 사용하는 경우 TEXTSPLIT 수식을 사용하여 구분 기호로 텍스트를 분할하고 결과를 인접 셀에 자동으로 분산시킬 수 있습니다.


방법 4: 파워 쿼리를 사용하여 셀 분할

파워 쿼리는 대량 데이터 분할 또는 자동화된 새로 고침(예: 매주 새 데이터 가져오기)을 위한 최고의 도구입니다. 원본 데이터를 그대로 유지하고 한 번의 클릭으로 분할 결과를 새로 고칠 수 있어 데이터 파이프라인 및 정기적인 데이터 정리에 매우 중요합니다.

단계별: 파워 쿼리에서 Excel 열 분할

  • 데이터 범위를 선택 → 데이터 탭으로 이동 → 테이블/범위에서를 클릭합니다(파워 쿼리가 열립니다).

  • 파워 쿼리 편집기에서 분할하려는 열을 선택합니다.

  • 열 분할 드롭다운을 클릭하고 옵션을 선택합니다.

    • 구분 기호 기준: 쉼표, 공백 또는 사용자 지정 문자로 분할합니다.
    • 문자 수 기준: 고정 길이 데이터를 분할합니다.
    • 위치 기준: 특정 문자 위치에서 분할합니다.
    • 소문자에서 대문자로: 소문자 뒤에 대문자가 오는 경우 분할합니다(예: "AirPlane" → "Air", "Plane").
    • 대문자에서 소문자로: 대문자 뒤에 소문자가 오는 경우 분할합니다(예: "iPhone" → "i", "Phone").
    • 숫자에서 숫자가 아닌 문자로: 숫자 뒤에 텍스트가 오는 경우 분할합니다(예: "123Shoes" → "123", "Shoes").
    • 숫자가 아닌 문자에서 숫자로: 텍스트 뒤에 숫자가 오는 경우 분할합니다(예: "Shoes123" → "Shoes", "123")
  • 분할 설정을 선택 → 확인을 클릭합니다.

  • 닫기 및 로드를 클릭하여 분할된 데이터를 새 워크시트로 내보냅니다.

Power Query editor with the Split Column dropdown menu showing split options

데이터를 분할하고 정리한 후 다음 단계는 종종 중복 제거입니다. 분석의 정확성을 보장하기 위해 Excel에서 중복을 식별하고 제거하는 방법 을 알아보세요.


방법 5: Python을 사용하여 셀 분할

대규모로 셀 분할을 자동화하거나 분할을 Python 워크플로우에 통합해야 하는 사용자를 위해 Free Spire.XLS for Python 라이브러리는 강력한 코드 기반 솔루션입니다. 모든 Excel 파일 형식(.xlsx, .xls)에서 작동하며 수동 Excel 상호 작용이 필요하지 않습니다.

Excel에서 셀을 분리하는 Python 코드

이 코드는 셀 내용을 인접한 열로 분할합니다. 입력 Excel 파일을 읽고 A열을 처리한 다음 분할 결과를 새 출력 파일의 인접한 열에 씁니다.

from spire.xls import *
from spire.xls.common import *

# Create an object of the Workbook class
workbook = Workbook()
# Load the Excel file
workbook.LoadFromFile("Data.xlsx")

# Get the first worksheet in the file
sheet = workbook.Worksheets[0]

# Loop through each row in the worksheet
for i in range(sheet.LastRow):
    # Get the text of the first cell in the current row
    text = sheet.Range[i + 1, 1].Text
    # Split the text by comma
    splitText = text.split(',')
    # Write the split data into individual columns
    for j in range(len(splitText)):
        sheet.Range[i + 1, j + 2].Text = splitText[j]

# Automatically adjust column widths in the worksheet
sheet.AllocatedRange.AutoFitColumns()

# Save the modified Excel file
workbook.SaveToFile("TextToColumns.xlsx", ExcelVersion.Version2016)
workbook.Dispose()

주요 코드 설명:

  • Workbook() / LoadFromFile(): Excel 파일 핸들러를 초기화하고 소스 파일을 로드합니다.
  • LastRow: 데이터가 있는 총 행 수를 가져옵니다(빈 행 반복 방지).
  • split(','): 쉼표로 셀 내용을 분할합니다(필요에 따라 구분 기호 변경).
  • sheet.Range[i + 1, j + 2].Text: A열의 원본 데이터를 덮어쓰지 않도록 B열(인덱스 2)부터 분할된 값을 씁니다.
  • SaveToFile(): 결과를 새 파일로 내보냅니다.

셀 텍스트를 열로 분할한 결과:

Split a cell content into multiple columns using Python

셀 내용을 구조화된 열로 분할한 후, 새 열에 데이터 유효성 검사를 적용하여 일관된 데이터 입력을 보장합니다(예: 우편 번호에 대한 숫자 형식).


Excel에서 셀을 나누기 위한 전문가 팁

  1. 데이터 백업: 분할하기 전에 항상 원본 데이터의 복사본을 만드십시오. 일부 분할 작업은 되돌리기 어렵습니다.
  2. 먼저 데이터 정리: 오류를 방지하기 위해 분할하기 전에 여분의 공백이나 숨겨진 문자를 제거하십시오.
  3. 빈 열 삽입: 분할 결과가 기존 내용을 덮어쓰는 것을 방지하기 위해 데이터 오른쪽에 충분한 빈 열을 추가하십시오.
  4. 데이터 미리보기 확인: 마치기 전에 항상 텍스트 나누기 마법사 및 파워 쿼리에서 데이터 미리보기를 확인하십시오. 이렇게 하면 구분 기호 실수를 조기에 발견할 수 있습니다.

마지막 생각들

Excel에서 셀을 분할하는 방법을 마스터하는 것은 지저분한 데이터를 구조화되고 강력한 자산으로 변환하는 기본 기술입니다. 빠른 채우기/텍스트 나누기를 사용하는 초보자, 파워 쿼리 파이프라인을 구축하는 고급 분석가, 또는 Python으로 대량 Excel 셀 분할을 자동화하는 기술에 정통한 사용자이든, 이제 모든 데이터 정리 과제를 위한 완벽한 툴킷을 갖게 되었습니다.

가장 편안하게 느껴지는 방법으로 시작하고 필요에 따라 더 고급 옵션을 실험해 보십시오. 이러한 기술을 사용하면 수많은 시간을 절약하고 분석 및 의사 결정을 위해 데이터의 잠재력을 최대한 활용할 수 있습니다.


자주 묻는 질문: Excel에서 셀을 분리하는 방법

Q1. 단일 셀을 (내용뿐만 아니라) 두 개의 더 작은 셀로 분할할 수 있나요?

아니요. Excel에서는 병합되지 않은 단일 셀을 동일한 열 내에서 두 개의 더 작은 셀로 물리적으로 분할할 수 없습니다. 그리드 구조는 고정되어 있습니다.

Q2. 텍스트 나누기가 회색으로 표시되는 이유는 무엇인가요?

다음과 같은 경우 도구가 비활성화됩니다.

  • 시트가 보호되어 있습니다(검토 → 시트 보호 해제를 통해 보호 해제).
  • 병합된 셀이 있습니다(홈 → 병합하고 가운데 맞춤 → 셀 병합 해제를 통해 병합 해제).
  • 셀을 편집 중입니다(편집 모드를 종료하려면 Enter 키를 누름).

Q3. Google Sheets에서 셀을 분할하려면 어떻게 해야 하나요?

Google Sheets는 대부분의 분할에 SPLIT 함수(Excel의 TEXTSPLIT에 해당)를 사용합니다.

  • 기본 구분 기호로 분할: =SPLIT(A1, ",") (쉼표로 분할, 공백/하이픈으로 대체).
  • 줄 바꿈으로 분할: =SPLIT(A1, CHAR(10)).
  • 행으로 분할(열 아님): =TRANSPOSE(SPLIT(A1, ",")).

Google Sheets에는 텍스트 나누기에 해당하는 기능도 있습니다. 범위를 선택 → 데이터텍스트를 열로 분할(구분 기호를 자동 감지하거나 사용자 지정 구분 기호를 선택할 수 있음).

Q4. 월간 보고서의 셀 분할을 자동화할 수 있나요?

예. 가장 좋은 옵션은 다음과 같습니다.

  • 파워 쿼리: 분할을 한 번 설정합니다. 매월 새 데이터를 소스 테이블에 붙여넣고 새로 고침을 클릭합니다. 이것이 가장 쉽고 일반적인 접근 방식입니다.
  • Python: 스크립트를 작성하고 Windows 작업 스케줄러 또는 cron 작업을 사용하여 실행하도록 예약합니다.

더 보기

I 5 metodi migliori per dividere il contenuto delle celle in Excel

Padroneggiare come dividere una cella in Excel è una delle competenze più essenziali per la pulizia dei dati per chiunque lavori con fogli di calcolo. Ci siamo passati tutti: incollare dati in Excel solo per trovare ogni informazione stipata in una singola colonna, trasformando nomi, indirizzi, email e codici prodotto in un pasticcio confuso che è inutile per l'ordinamento, il filtraggio o un'analisi significativa.

Anche se Excel non consente di dividere fisicamente una singola cella in due celle più piccole all'interno della stessa colonna, fornisce potenti strumenti per dividere il contenuto di una cella su più colonne adiacenti. In questa guida, analizzeremo i 5 metodi migliori per dividere i dati delle celle in Excel, dagli strumenti a un clic per principianti come il Riempimento automatico ai flussi di lavoro automatizzati con Power Query e Python.

Imparerai:

Alla fine, sarai in grado di trasformare dati disordinati e inutilizzabili in fogli di calcolo pronti per l'analisi in pochi minuti.


Cosa significa "Dividi una cella" in Excel?

In Excel, la frase "dividi una cella" può creare confusione perché non è possibile dividere fisicamente una singola cella. Invece, il termine si riferisce a due azioni diverse:

  1. Divisione del contenuto di una cella: prendere i dati all'interno di una cella e distribuirli su più celle adiacenti (ad esempio, separando "Mario Rossi" in "Mario" in una colonna e "Rossi" nella successiva).
  2. Divisione di una cella unita: annullare un'unione per ripristinare le celle singole originali.

Questa guida si concentra sulla prima attività, più comune: dividere i dati delle celle in Excel.


Metodo 1: Dividi cella con Testo in colonne di Excel

Testo in colonne è uno strumento integrato di Excel che consente di dividere il testo di una cella o di una colonna in due o più colonne separate. Funziona sia per dati delimitati (testo separato da virgole, spazi o altri caratteri) sia per dati a larghezza fissa (testo con spaziatura coerente). Ecco come utilizzare ciascuno:

Opzione A: Dividi cella di Excel per delimitatore

Questo metodo è perfetto per dividere dati come file CSV o elenchi in cui gli elementi sono separati da un simbolo coerente.

  • Seleziona le celle o la colonna che desideri dividere.
  • Vai alla scheda Dati → fai clic su Testo in colonne (nel gruppo Strumenti dati).

Scheda Dati di Excel con il pulsante Testo in colonne

  • Nella procedura guidata Testo in colonne:
    • Seleziona Delimitato → fai clic su Avanti.
    • Seleziona la casella accanto al tuo delimitatore (ad es. Virgola, Spazio o Tabulazione) → fai clic su Avanti.
    • Scegli una Destinazione (dove posizionare i dati divisi, ad es. $C$1 per iniziare nella colonna C).
    • Seleziona i formati delle colonne (ad es. Generale per testo/numeri, Testo per i numeri di telefono)
    • Fai clic su Fine. I tuoi dati sono ora divisi in colonne separate.

Dividi il testo in colonne separate in base al delimitatore

Suggerimento: durante la selezione del delimitatore, è possibile selezionare più delimitatori se necessario (ad es. virgola + spazio). Se il delimitatore non è elencato, seleziona Altro e digita il carattere (ad es. un trattino "-" o una barra verticale "|").

Opzione B: Dividi testo di Excel per larghezza fissa

Questo metodo è ideale per dati allineati con spaziatura uniforme (ad es. codici prodotto, ID formattati):

  • Segui i passaggi 1-2 sopra (seleziona celle → Dati → Testo in colonne).
  • Nella procedura guidata Testo in colonne:
    • Seleziona Larghezza fissa → fai clic su Avanti.
    • Fai clic per aggiungere linee di divisione, trascina per regolare le posizioni o fai doppio clic per eliminare le linee → fai clic su Avanti.

Procedura guidata Testo in colonne con una linea di divisione a larghezza fissa aggiunta nell'anteprima dei dati

  • Scegli una destinazione e i formati delle colonne → fai clic su Fine.

I dati divisi appaiono così:

Colonne di Excel prima e dopo una divisione a larghezza fissa

Espandi: se hai un elenco all'interno di una cella e desideri dividere la cella in più righe, puoi combinare Testo in colonne con la funzione Trasponi di Excel.


Metodo 2: Dividi cella con Riempimento automatico

Riempimento automatico è lo strumento "magico" di Excel per divisioni semplici con un clic. Riconosce i modelli definiti e completa automaticamente il resto. Nessun menu o formula, perfetto per estrarre nomi, numeri di telefono, prefissi o modelli personalizzati.

Come utilizzare il Riempimento automatico per la divisione delle celle di Excel

Scenario: estrarre i nomi da un elenco di nomi completi nella colonna A.

  • Digita il primo risultato della divisione nella cella accanto ai tuoi dati. Ad esempio, se la cella A1 è “Liam Johnson”, digita “Liam” in B1.
  • Fai clic sulla cella B1 (quella con il tuo esempio).
  • Vai alla scheda Dati → fai clic su Riempimento automatico (o usa la scorciatoia Ctrl + E su Windows).
  • Excel riempirà automaticamente il resto della colonna con i nomi divisi. Ripeti per i cognomi se necessario.

Foglio di Excel che utilizza il Riempimento automatico per estrarre i nomi da un elenco di nomi completi


Metodo 3: Dividi cella con Formule

Per divisioni flessibili e dinamiche (ad es. aggiornare automaticamente il risultato della divisione quando i dati originali cambiano), utilizza la formula di divisione in Excel. Le formule più comuni sono SINISTRA, DESTRA e TESTO.DIVIDI (Excel 365/2021+).

Estrai testo prima di un delimitatore (SINISTRA + RICERCA)

Usa questa formula per dividere il testo prima di un carattere specifico (ad es. uno spazio o una virgola).

=SINISTRA(A1; RICERCA(" "; A1) - 1)

  • RICERCA(" "; A1): trova il numero di posizione del primo spazio.
  • -1: rimuove lo spazio stesso, quindi ottieni "Liam" invece di "Liam ".

Formula di divisione del testo SINISTRA di Excel per estrarre il nome dalla cella A1

Estrai testo dopo un delimitatore (DESTRA + LUNGH + RICERCA)

Usa questa formula per dividere il testo dopo un carattere specifico (parte destra):

=DESTRA(A1; LUNGH(A1) - RICERCA(" "; A1))

  • LUNGH(A1): ottiene la lunghezza totale del testo.
  • Sottrai la posizione dello spazio per ottenere il testo rimanente.
  • Nota: questa formula funziona solo per i casi con un singolo delimitatore (ad es. uno spazio o una virgola). Estrae tutto il testo dopo il primo delimitatore come un singolo blocco e non può gestire più delimitatori.

Formula di divisione del testo DESTRA di Excel per estrarre il cognome dalla cella A1

Se utilizzi Microsoft 365, puoi utilizzare la formula TESTO.DIVIDI per dividere il testo in base a un delimitatore e distribuire automaticamente i risultati nelle celle adiacenti.


Metodo 4: Dividi cella con Power Query

Power Query è lo strumento migliore per divisioni di dati in blocco o aggiornamenti automatici (ad es. importazione settimanale di nuovi dati). Mantiene intatti i dati originali e consente di aggiornare i risultati della divisione con un clic, fondamentale per le pipeline di dati e la pulizia regolare dei dati.

Passo dopo passo: Dividi colonne di Excel in Power Query

  • Seleziona il tuo intervallo di dati → vai alla scheda Dati → fai clic su Da tabella/intervallo (si aprirà Power Query).

  • Nell'editor di Power Query, seleziona la colonna che desideri dividere.

  • Fai clic sul menu a discesa Dividi colonna e seleziona un'opzione:

    • Per delimitatore: dividi per virgole, spazi o caratteri personalizzati.
    • Per numero di caratteri: dividi dati a lunghezza fissa.
    • Per posizioni: dividi in posizioni di caratteri specifiche.
    • Da minuscolo a maiuscolo: divide quando una lettera minuscola è seguita da una maiuscola (ad es. "AirPlane" → "Air", "Plane").
    • Da maiuscolo a minuscolo: divide quando una maiuscola è seguita da una minuscola (ad es. "iPhone" → "i", "Phone").
    • Da cifra a non cifra: divide quando un numero è seguito da testo (ad es. "123Shoes" → "123", "Shoes").
    • Da non cifra a cifra: divide quando il testo è seguito da un numero (ad es. "Shoes123" → "Shoes", "123")
  • Seleziona le impostazioni di divisione → fai clic su OK.

  • Fai clic su Chiudi e carica per esportare i dati divisi in un nuovo foglio di lavoro.

Editor di Power Query con il menu a discesa Dividi colonna che mostra le opzioni di divisione

Dopo aver diviso e organizzato i dati, il passaggio successivo è spesso la deduplicazione. Scopri come identificare e rimuovere i duplicati in Excel per garantire che la tua analisi sia accurata.


Metodo 5: Dividi cella con Python

Per gli utenti che necessitano di automatizzare la divisione delle celle su larga scala o di integrare la divisione in un flusso di lavoro Python, la libreria Free Spire.XLS for Python è una soluzione solida basata su codice. Funziona con tutti i formati di file Excel (.xlsx, .xls) e non richiede alcuna interazione manuale con Excel.

Codice Python per separare le celle in Excel

Questo codice divide il contenuto della cella in colonne adiacenti. Legge un file Excel di input, elabora la colonna A e scrive i risultati della divisione nelle colonne adiacenti in un nuovo file di output:

from spire.xls import *
from spire.xls.common import *

# Create an object of the Workbook class
workbook = Workbook()
# Load the Excel file
workbook.LoadFromFile("Data.xlsx")

# Get the first worksheet in the file
sheet = workbook.Worksheets[0]

# Loop through each row in the worksheet
for i in range(sheet.LastRow):
    # Get the text of the first cell in the current row
    text = sheet.Range[i + 1, 1].Text
    # Split the text by comma
    splitText = text.split(',')
    # Write the split data into individual columns
    for j in range(len(splitText)):
        sheet.Range[i + 1, j + 2].Text = splitText[j]

# Automatically adjust column widths in the worksheet
sheet.AllocatedRange.AutoFitColumns()

# Save the modified Excel file
workbook.SaveToFile("TextToColumns.xlsx", ExcelVersion.Version2016)
workbook.Dispose()

Spiegazioni chiave del codice:

  • Workbook() / LoadFromFile(): inizializza il gestore di file Excel e carica il file di origine.
  • LastRow: ottiene il numero totale di righe con dati (evita di scorrere le righe vuote).
  • split(','): divide il contenuto della cella per virgole (cambia il delimitatore secondo necessità).
  • sheet.Range[i + 1, j + 2].Text: scrive i valori divisi a partire dalla colonna B (indice 2) per evitare di sovrascrivere i dati originali nelle colonne A.
  • SaveToFile(): esporta i risultati in un nuovo file.

Il risultato della divisione del testo della cella in colonne:

Dividi il contenuto di una cella in più colonne usando Python

Dopo aver diviso il contenuto della cella in colonne strutturate, applica la convalida dei dati alle nuove colonne per garantire un inserimento dati coerente (ad es. formati numerici per i codici postali).


Suggerimenti professionali per dividere una cella in Excel

  1. Esegui il backup dei tuoi dati: crea sempre una copia dei dati originali prima di dividerli. Alcune azioni di divisione sono difficili da annullare.
  2. Pulisci prima i dati: rimuovi spazi extra o caratteri nascosti prima di dividere per evitare errori.
  3. Inserisci colonne vuote: aggiungi abbastanza colonne vuote a destra dei tuoi dati per evitare che i risultati della divisione sovrascrivano il contenuto esistente.
  4. Controlla l'anteprima dei dati: guarda sempre l'anteprima dei dati nella procedura guidata Testo in colonne e in Power Query prima di terminare. Ciò consente di individuare tempestivamente gli errori di delimitazione.

Considerazioni finali

Padroneggiare come dividere una cella in Excel è una competenza fondamentale che trasforma dati disordinati in una risorsa strutturata e potente. Che tu sia un principiante che utilizza Riempimento automatico/Testo in colonne, un analista avanzato che crea pipeline di Power Query o un utente esperto di tecnologia che automatizza la divisione di celle Excel in blocco con Python, ora hai un toolkit completo per qualsiasi sfida di pulizia dei dati.

Inizia con il metodo che ti sembra più comodo e sperimenta le opzioni più avanzate man mano che le tue esigenze crescono. Con queste tecniche, risparmierai innumerevoli ore e sbloccherai il pieno potenziale dei tuoi dati per l'analisi e il processo decisionale.


FAQ: Come separare una cella in Excel

D1. Posso dividere una singola cella in due celle più piccole (non solo il contenuto)?

No. Excel non consente di dividere fisicamente una singola cella non unita in due celle più piccole all'interno della stessa colonna. La struttura della griglia è fissa.

D2. Perché Testo in colonne è disattivato?

Lo strumento è disabilitato se:

  • Il tuo foglio è protetto (rimuovi la protezione tramite Revisione → Rimuovi protezione foglio).
  • Hai celle unite (separa tramite Home → Unisci e allinea al centro → Separa celle).
  • Stai modificando una cella (premi Invio per uscire dalla modalità di modifica).

D3. Come si divide una cella in Fogli Google?

Fogli Google utilizza la funzione SPLIT (l'equivalente di TESTO.DIVIDI di Excel) per la maggior parte delle divisioni:

  • Divisione di base per delimitatore: =SPLIT(A1; ",") (divisione per virgola; sostituire con spazio/trattino).
  • Divisione per interruzioni di riga: =SPLIT(A1; CHAR(10)).
  • Divisione in righe (non colonne): =TRANSPOSE(SPLIT(A1; ",")).

Fogli Google ha anche un equivalente di Testo in colonne: seleziona l'intervallo → DatiDividi testo in colonne (rileva automaticamente i delimitatori o ti consente di sceglierne uno personalizzato).

D4. Posso automatizzare la divisione delle celle per i report mensili?

Sì. Le migliori opzioni sono:

  • Power Query: imposta la divisione una volta. Ogni mese, incolla i nuovi dati nella tabella di origine e fai clic su Aggiorna. Questo è l'approccio più semplice e comune.
  • Python: scrivi uno script e pianificane l'esecuzione utilizzando l'Utilità di pianificazione di Windows o un cron job.

Vedi anche