Como inserir hiperlinks no PowerPoint [Guia detalhado]

Os hiperlinks podem tornar as apresentações do PowerPoint mais fáceis de navegar e mais envolventes para o público. Em vez de criar slides carregados de texto, adicionar hiperlinks ajuda a manter o layout limpo, permitindo que os espectadores acessem recursos externos instantaneamente. Neste guia, você aprenderá como inserir hiperlinks no PowerPoint, abrangendo tanto operações manuais no Microsoft PowerPoint quanto a automação usando Python para textos, imagens e outros elementos visuais.
- Como inserir hiperlinks no PowerPoint
- Cenários práticos: Vinculando imagens e vídeos online
- Inserir um hiperlink em apresentações do PowerPoint com Python
- Perguntas frequentes (FAQs)
Como inserir hiperlinks no PowerPoint
No PowerPoint, os hiperlinks geralmente apontam para arquivos externos, páginas da web ou slides específicos dentro da apresentação. Felizmente, as etapas principais são as mesmas, independentemente do tipo de destino. Com o Microsoft PowerPoint, você pode adicionar um hiperlink em textos ou imagens em apenas três etapas simples.
Siga estas etapas para inserir hiperlinks no PowerPoint:
- Etapa 1: Selecione o objeto clicando para destacar a palavra, imagem, forma ou ícone que você deseja tornar clicável.
- Etapa 2: Vá para a faixa de opções superior e clique em Inserir > Links > Link.

- Etapa 3: Na caixa de diálogo pop-up, defina o destino desejado:

- Arquivo ou Página da Web Existente: Cole uma URL externa (por exemplo, https://example.com) ou selecione um arquivo local no seu computador.
- Colocar neste documento: Escolha um número de slide ou título específico dentro da sua apresentação atual.
- Endereço de e-mail: Configure um link mailto: automático para respostas rápidas por e-mail.
Cenários práticos: Vinculando imagens e vídeos online
Além dos links básicos, os hiperlinks também são úteis para criar logotipos interativos, botões de navegação e apresentações de vídeo leves.
1: Logotipos interativos e ícones de navegação
Adicionar hiperlinks a logotipos e gráficos os transforma de visuais em ferramentas de navegação funcionais, aprimorando a identidade da marca e mantendo a apresentação do PowerPoint interativa.
- Autoridade da marca: Vincule o logotipo da sua empresa diretamente ao site oficial, página de destino do produto ou loja online para que os espectadores possam explorar sua marca instantaneamente.
- Navegação personalizada: Vincule ícones de "início", "menu" ou "voltar ao topo" ao Slide 1 ou a uma página de índice para saltos rápidos e flexíveis durante sessões de perguntas e respostas ao vivo.
2: Compartilhamento leve de vídeos online
Inserir arquivos de vídeo diretamente no PowerPoint geralmente aumenta o tamanho dos arquivos, tornando as apresentações difíceis de enviar por e-mail ou executar sem problemas em hardwares mais antigos.
Para manter sua apresentação leve:
- Insira uma imagem de botão de reprodução ou uma chamada de texto (por exemplo, "Assistir à demonstração completa").
- Aplique um hiperlink apontando para a URL do seu vídeo no YouTube, Vimeo ou armazenamento em nuvem.
Dica: Vídeos com hiperlink vs. Vídeos incorporados
Ao compartilhar vídeos no PowerPoint, você pode vincular a um vídeo externo ou incorporar o arquivo de vídeo diretamente. A escolha do método certo depende dos limites de tamanho do seu arquivo e da configuração da apresentação:
- Vídeo com hiperlink: Vincula diretamente a uma URL da web (por exemplo, YouTube) ou caminho de arquivo local. Ele abre em um navegador da web, mantendo o tamanho da apresentação mínimo e fácil de enviar por e-mail.
- Vídeo incorporado: Integra o arquivo de vídeo real na apresentação. Ele é reproduzido diretamente dentro do slide sem depender da internet, mas aumenta significativamente o tamanho do arquivo.
Inserir um hiperlink em apresentações do PowerPoint sem esforço com Python
A inserção manual de hiperlinks funciona bem para pequenas apresentações. No entanto, ao processar centenas de slides ou gerar apresentações dinamicamente, a automação torna-se mais eficiente. Para otimizar fluxos de trabalho, os desenvolvedores podem usar o Free Spire.Presentation for Python para adicionar hiperlinks automaticamente. O Free Spire.Presentation fornece APIs para adicionar hiperlinks a textos, imagens e formas programaticamente, facilitando a automação do processamento de apresentações em larga escala.
Adicionando hiperlinks a textos
Os hiperlinks de texto são aplicados no nível TextRange dentro da caixa de texto de uma forma. Ao iterar pelos parágrafos e intervalos de texto, você pode localizar palavras-chave específicas e definir sua URL de destino via ClickAction.Address.
Adicionando hiperlinks a imagens ou formas
Para elementos visuais como formas ou imagens incorporadas, os hiperlinks são aplicados no nível do objeto de forma. Você pode instanciar um objeto ClickHyperlink com sua URL de destino e atribuí-lo diretamente à propriedade .Click da imagem.
Exemplo completo de código Python
Este exemplo de código mostra como inserir hiperlinks para texto e uma imagem em uma apresentação do PowerPoint:
from spire.presentation import *
from spire.presentation.common import *
# Criar um novo objeto Presentation e carregar um arquivo PowerPoint
presentation = Presentation()
presentation.LoadFromFile("/sample.pptx")
# Obter o primeiro slide
slide = presentation.Slides[0]
# Inserir hiperlink no texto
for shape in slide.Shapes:
if isinstance(shape, IAutoShape):
for para in shape.TextFrame.Paragraphs:
for tr in para.TextRanges:
# Encontrar a palavra-chave de texto especificada
if "Spire.Presentation" in tr.Text:
# Adicionar hiperlink ao texto
tr.ClickAction.Address = "https://www.e-iceblue.com"
# Criar uma forma retangular e definir a posição e o tamanho da imagem
rect = RectangleF.FromLTRB(400, 380, 660, 450)
# Anexar uma imagem ao slide e definir sua posição e tamanho
image = slide.Shapes.AppendEmbedImageByPath(ShapeType.Rectangle, "/Logo1.png", rect)
# Inserir um hiperlink na imagem
hyperlink = ClickHyperlink("https://www.e-iceblue.com")
image.Click = hyperlink
# Salvar a apresentação modificada
presentation.SaveToFile("/output/AddHyperlinks_Output.pptx", FileFormat.Pptx2013)
presentation.Dispose()
A imagem a seguir mostra o arquivo PowerPoint resultante com hiperlinks inseridos:

Perguntas frequentes (FAQs) sobre a inserção de hiperlinks no PowerPoint
Como edito ou removo um hiperlink no PowerPoint?
Clique com o botão direito no texto, imagem ou forma vinculada. Selecione Editar Link para alterar a URL de destino ou clique em Remover Link para converter o elemento de volta em conteúdo estático.
Os hiperlinks ainda funcionarão após converter o PowerPoint para PDF?
A maioria dos hiperlinks da web é preservada durante a conversão de PowerPoint para PDF. Links de navegação interna entre slides dependem da ferramenta de conversão e da compatibilidade do visualizador de PDF.
Por que o PowerPoint exibe um aviso de segurança ao clicar em um link de vídeo?
O PowerPoint aciona alertas de segurança padrão sempre que um elemento tenta iniciar navegadores da web externos ou executáveis locais. Você pode clicar com segurança em Sim para continuar ou ajustar suas configurações em Arquivo > Opções > Central de Confiabilidade > Configurações da Central de Confiabilidade para personalizar os avisos de link.
Conclusão
Adicionar hiperlinks no PowerPoint ajuda a criar apresentações mais interativas e fáceis de usar. Para tarefas simples, você pode usar as ferramentas integradas do PowerPoint para vincular textos, imagens, vídeos ou slides. Ao trabalhar com apresentações grandes, o Free Spire.Presentation oferece uma maneira programática de automatizar a criação de hiperlinks. Antes de compartilhar sua apresentação, lembre-se de testar todos os links no modo de apresentação de slides para garantir que funcionem conforme o esperado.
Leia também:
파워포인트에 하이퍼링크를 삽입하는 방법 [상세 가이드]

하이퍼링크를 사용하면 PowerPoint 프레젠테이션을 더 쉽게 탐색하고 청중의 참여를 유도할 수 있습니다. 텍스트가 많은 슬라이드를 만드는 대신 하이퍼링크를 추가하면 레이아웃을 깔끔하게 유지하면서 시청자가 외부 리소스에 즉시 액세스할 수 있습니다. 이 가이드에서는 PowerPoint에서 하이퍼링크를 삽입하는 방법을 배우게 되며, Microsoft PowerPoint에서의 수동 작업과 Python을 사용한 텍스트, 이미지 및 기타 시각적 요소의 자동화 방법을 모두 다룹니다.
- PowerPoint에서 하이퍼링크를 삽입하는 방법
- 실용적인 시나리오: 사진 및 온라인 비디오 연결
- Python을 사용하여 PowerPoint 프레젠테이션에 하이퍼링크 삽입
- 자주 묻는 질문(FAQs)
PowerPoint에서 하이퍼링크를 삽입하는 방법
PowerPoint에서 하이퍼링크는 일반적으로 외부 파일, 웹 페이지 또는 프레젠테이션 내의 특정 슬라이드를 가리킵니다. 다행히 대상 유형에 관계없이 핵심 단계는 동일합니다. Microsoft PowerPoint를 사용하면 세 가지 간단한 단계만으로 텍스트나 이미지에 하이퍼링크를 추가할 수 있습니다.
다음 단계에 따라 PowerPoint에 하이퍼링크를 삽입하세요:
- 1단계: 클릭 가능한 상태로 만들고 싶은 텍스트 단어, 그림, 도형 또는 아이콘을 클릭하여 개체를 선택합니다.
- 2단계: 상단 리본 메뉴에서 삽입 > 링크 > 링크를 클릭합니다.

- 3단계: 팝업 대화 상자에서 대상 위치를 설정합니다:

- 기존 파일 또는 웹 페이지: 외부 URL을 붙여넣거나(예: https://example.com) 컴퓨터의 로컬 파일을 선택합니다.
- 현재 문서: 현재 프레젠테이션 내의 특정 슬라이드 번호나 제목을 선택합니다.
- 전자 메일 주소: 빠른 이메일 응답을 위해 자동 mailto: 링크를 구성합니다.
실용적인 시나리오: 사진 및 온라인 비디오 연결
기본 링크 외에도 하이퍼링크는 대화형 로고, 탐색 버튼 및 가벼운 비디오 프레젠테이션을 만드는 데 유용합니다.
1: 대화형 로고 및 탐색 아이콘
로고와 그래픽에 하이퍼링크를 추가하면 단순한 시각 자료에서 기능적인 탐색 도구로 변환되어 브랜드 아이덴티티를 강화하고 프레젠테이션을 대화형으로 유지할 수 있습니다.
- 브랜드 권위: 회사 로고를 공식 웹사이트, 제품 랜딩 페이지 또는 온라인 스토어에 직접 연결하여 시청자가 브랜드를 즉시 탐색할 수 있도록 합니다.
- 사용자 지정 탐색: 홈, 메뉴 또는 맨 위로 이동 아이콘을 슬라이드 1이나 인덱스 페이지에 연결하여 실시간 질의응답 세션 중에 빠르고 유연하게 이동할 수 있습니다.
2: 가벼운 온라인 비디오 공유
비디오 파일 삽입을 PowerPoint에 직접 수행하면 파일 크기가 커져 이메일로 보내거나 구형 하드웨어에서 원활하게 실행하기 어려울 수 있습니다.
프레젠테이션을 가볍게 유지하려면:
- 재생 버튼 이미지나 텍스트 콜아웃(예: "전체 데모 보기")을 삽입합니다.
- YouTube, Vimeo 또는 클라우드 스토리지의 비디오 URL을 가리키는 하이퍼링크를 적용합니다.
팁: 하이퍼링크된 비디오 vs. 포함된 비디오
PowerPoint에서 비디오를 공유할 때 외부 비디오에 연결하거나 비디오 파일을 직접 포함할 수 있습니다. 올바른 방법을 선택하는 것은 파일 크기 제한과 프레젠테이션 설정에 따라 다릅니다:
- 하이퍼링크된 비디오: 웹 URL(예: YouTube) 또는 로컬 파일 경로에 직접 연결됩니다. 웹 브라우저에서 열리므로 프레젠테이션 크기를 최소화하고 이메일로 보내기 쉽습니다.
- 포함된 비디오: 실제 비디오 파일을 프레젠테이션에 통합합니다. 인터넷 연결 없이 슬라이드 프레임 내에서 직접 재생되지만 파일 크기가 크게 증가합니다.
Python을 사용하여 PowerPoint 프레젠테이션에 하이퍼링크 삽입
수동 하이퍼링크 삽입은 소규모 프레젠테이션에는 잘 작동합니다. 그러나 수백 개의 슬라이드를 처리하거나 프레젠테이션을 동적으로 생성할 때는 자동화가 더 효율적입니다. 워크플로를 간소화하기 위해 개발자는 Free Spire.Presentation for Python을 사용하여 하이퍼링크를 자동으로 추가할 수 있습니다. Free Spire.Presentation은 텍스트, 이미지 및 도형에 프로그래밍 방식으로 하이퍼링크를 추가하는 API를 제공하여 대규모 프레젠테이션 처리를 자동화하기 쉽게 만듭니다.
텍스트에 하이퍼링크 추가
텍스트 하이퍼링크는 도형의 텍스트 프레임 내 TextRange 수준에서 적용됩니다. 단락과 텍스트 범위를 반복하여 특정 키워드를 찾고 ClickAction.Address를 통해 대상 URL을 설정할 수 있습니다.
사진이나 도형에 하이퍼링크 추가
도형이나 포함된 이미지와 같은 시각적 요소의 경우 하이퍼링크는 도형 개체 수준에서 적용됩니다. 대상 URL로 ClickHyperlink 개체를 인스턴스화하고 이미지의 .Click 속성에 직접 할당할 수 있습니다.
전체 Python 코드 예제
이 코드 예제는 PowerPoint 프레젠테이션에서 텍스트와 이미지에 하이퍼링크를 삽입하는 방법을 보여줍니다:
from spire.presentation import *
from spire.presentation.common import *
# 새 Presentation 개체를 만들고 PowerPoint 파일 로드
presentation = Presentation()
presentation.LoadFromFile("/sample.pptx")
# 첫 번째 슬라이드 가져오기
slide = presentation.Slides[0]
# 텍스트에 하이퍼링크 삽입
for shape in slide.Shapes:
if isinstance(shape, IAutoShape):
for para in shape.TextFrame.Paragraphs:
for tr in para.TextRanges:
# 지정된 텍스트 키워드 찾기
if "Spire.Presentation" in tr.Text:
# 텍스트에 하이퍼링크 추가
tr.ClickAction.Address = "https://www.e-iceblue.com"
# 직사각형 도형을 만들고 이미지 위치와 크기 정의
rect = RectangleF.FromLTRB(400, 380, 660, 450)
# 슬라이드에 이미지 추가 및 위치와 크기 설정
image = slide.Shapes.AppendEmbedImageByPath(ShapeType.Rectangle, "/Logo1.png", rect)
# 이미지에 하이퍼링크 삽입
hyperlink = ClickHyperlink("https://www.e-iceblue.com")
image.Click = hyperlink
# 수정된 프레젠테이션 저장
presentation.SaveToFile("/output/AddHyperlinks_Output.pptx", FileFormat.Pptx2013)
presentation.Dispose()
다음 이미지는 하이퍼링크가 삽입된 결과 PowerPoint 파일을 보여줍니다:

PowerPoint 하이퍼링크 삽입 관련 자주 묻는 질문(FAQs)
PowerPoint에서 하이퍼링크를 편집하거나 제거하려면 어떻게 하나요?
연결된 텍스트, 그림 또는 도형을 마우스 오른쪽 버튼으로 클릭합니다. 하이퍼링크 편집을 선택하여 대상 URL을 변경하거나, 하이퍼링크 제거를 클릭하여 요소를 정적 콘텐츠로 되돌립니다.
PowerPoint를 PDF로 변환한 후에도 하이퍼링크가 작동하나요?
PowerPoint-to-PDF 변환 중에 대부분의 웹 하이퍼링크는 유지됩니다. 내부 슬라이드 탐색 링크는 변환 도구 및 PDF 뷰어 호환성에 따라 다릅니다.
비디오 링크를 클릭할 때 PowerPoint에 보안 경고가 표시되는 이유는 무엇인가요?
요소가 외부 웹 브라우저나 로컬 실행 파일을 시작하려고 할 때마다 PowerPoint는 기본 보안 경고를 트리거합니다. 예를 클릭하여 안전하게 진행하거나, 파일 > 옵션 > 보안 센터 > 보안 센터 설정에서 설정을 조정하여 링크 경고를 사용자 지정할 수 있습니다.
마무리
PowerPoint에 하이퍼링크를 추가하면 더 대화형이고 사용자 친화적인 프레젠테이션을 만드는 데 도움이 됩니다. 간단한 작업의 경우 PowerPoint의 내장 도구를 사용하여 텍스트, 이미지, 비디오 또는 슬라이드를 연결할 수 있습니다. 대규모 프레젠테이션을 작업할 때는 Free Spire.Presentation을 사용하여 하이퍼링크 생성을 자동화하는 프로그래밍 방식을 사용할 수 있습니다. 프레젠테이션을 공유하기 전에 슬라이드 쇼 모드에서 모든 링크를 테스트하여 예상대로 작동하는지 확인하세요.
추가 읽기:
Come inserire collegamenti ipertestuali in PowerPoint [Guida dettagliata]

I collegamenti ipertestuali possono rendere le presentazioni PowerPoint più facili da navigare e più coinvolgenti per il pubblico. Invece di creare diapositive piene di testo, l'aggiunta di collegamenti ipertestuali aiuta a mantenere il layout pulito, consentendo agli spettatori di accedere istantaneamente a risorse esterne. In questa guida, imparerai come inserire collegamenti ipertestuali in PowerPoint, coprendo sia le operazioni manuali in Microsoft PowerPoint che l'automazione tramite Python per testo, immagini e altri elementi visivi.
- Come inserire collegamenti ipertestuali in PowerPoint
- Scenari pratici: collegare immagini e video online
- Inserire un collegamento ipertestuale nelle presentazioni PowerPoint con Python
- Domande frequenti (FAQ)
Come inserire collegamenti ipertestuali in PowerPoint
In PowerPoint, i collegamenti ipertestuali solitamente puntano a file esterni, pagine web o diapositive specifiche all'interno della presentazione. Fortunatamente, i passaggi fondamentali sono gli stessi indipendentemente dal tipo di destinazione. Con Microsoft PowerPoint, puoi aggiungere un collegamento ipertestuale a testo o immagini in soli tre semplici passaggi.
Segui questi passaggi per inserire collegamenti ipertestuali in PowerPoint:
- Passaggio 1: Seleziona l'oggetto facendo clic per evidenziare la parola, l'immagine, la forma o l'icona che desideri rendere cliccabile.
- Passaggio 2: Vai alla barra multifunzione in alto e fai clic su Inserisci > Collegamenti > Collegamento.

- Passaggio 3: Nella finestra di dialogo che appare, imposta la destinazione desiderata:

- File o pagina web esistente: Incolla un URL esterno (ad es. https://example.com) o seleziona un file locale sul tuo computer.
- Inserisci nel documento: Scegli un numero di diapositiva specifico o un titolo all'interno della presentazione corrente.
- Indirizzo e-mail: Configura un collegamento mailto: automatico per risposte rapide via e-mail.
Scenari pratici: collegare immagini e video online
Oltre ai collegamenti di base, i collegamenti ipertestuali sono utili anche per creare loghi interattivi, pulsanti di navigazione e presentazioni video leggere.
1: Loghi interattivi e icone di navigazione
L'aggiunta di collegamenti ipertestuali a loghi e grafiche li trasforma da elementi visivi in strumenti di navigazione funzionali, migliorando l'identità del marchio e mantenendo la presentazione PowerPoint interattiva.
- Autorità del marchio: Collega il logo della tua azienda direttamente al sito web ufficiale, alla pagina di destinazione del prodotto o al negozio online in modo che gli spettatori possano esplorare il tuo marchio istantaneamente.
- Navigazione personalizzata: Collega icone come "Home", "Menu" o "Torna all'inizio" alla diapositiva 1 o a una pagina indice per spostamenti rapidi e flessibili durante le sessioni di domande e risposte dal vivo.
2: Condivisione leggera di video online
L'inserimento di file video direttamente in PowerPoint spesso aumenta le dimensioni del file, rendendo le presentazioni difficili da inviare via e-mail o da eseguire senza problemi su hardware meno recente.
Per mantenere la tua presentazione leggera:
- Inserisci un'immagine con il pulsante "Play" o un richiamo testuale (ad es. "Guarda la demo completa").
- Applica un collegamento ipertestuale che punta all'URL del tuo video su YouTube, Vimeo o archiviazione cloud.
Suggerimento: Video con collegamento ipertestuale vs. Video incorporati
Quando condividi video in PowerPoint, puoi collegarti a un video esterno o incorporare il file video direttamente. La scelta del metodo giusto dipende dai limiti di dimensione del file e dalla configurazione della presentazione:
- Video con collegamento ipertestuale: Si collega direttamente a un URL web (ad es. YouTube) o a un percorso di file locale. Si apre in un browser web, mantenendo le dimensioni della presentazione minime e facili da inviare via e-mail.
- Video incorporato: Integra il file video effettivo nella presentazione. Viene riprodotto direttamente all'interno della diapositiva senza dipendenza da Internet, ma aumenta significativamente le dimensioni del file.
Inserire un collegamento ipertestuale nelle presentazioni PowerPoint senza sforzo con Python
L'inserimento manuale dei collegamenti ipertestuali funziona bene per presentazioni piccole. Tuttavia, quando si elaborano centinaia di diapositive o si generano presentazioni in modo dinamico, l'automazione diventa più efficiente. Per semplificare i flussi di lavoro, gli sviluppatori possono utilizzare Free Spire.Presentation for Python per aggiungere collegamenti ipertestuali automaticamente. Free Spire.Presentation fornisce API per aggiungere collegamenti ipertestuali a testo, immagini e forme a livello di programmazione, facilitando l'automazione dell'elaborazione di presentazioni su larga scala.
Aggiunta di collegamenti ipertestuali al testo
I collegamenti ipertestuali di testo vengono applicati a livello di TextRange all'interno della cornice di testo di una forma. Iterando attraverso paragrafi e intervalli di testo, è possibile individuare parole chiave specifiche e impostare il loro URL di destinazione tramite ClickAction.Address.
Aggiunta di collegamenti ipertestuali a immagini o forme
Per elementi visivi come forme o immagini incorporate, i collegamenti ipertestuali vengono applicati a livello di oggetto forma. È possibile istanziare un oggetto ClickHyperlink con l'URL di destinazione e assegnarlo direttamente alla proprietà .Click dell'immagine.
Esempio di codice Python completo
Questo esempio di codice mostra come inserire collegamenti ipertestuali per testo e un'immagine in una presentazione PowerPoint:
from spire.presentation import *
from spire.presentation.common import *
# Crea un nuovo oggetto Presentation e carica un file PowerPoint
presentation = Presentation()
presentation.LoadFromFile("/sample.pptx")
# Ottieni la prima diapositiva
slide = presentation.Slides[0]
# Inserisci collegamento ipertestuale al testo
for shape in slide.Shapes:
if isinstance(shape, IAutoShape):
for para in shape.TextFrame.Paragraphs:
for tr in para.TextRanges:
# Trova la parola chiave specificata
if "Spire.Presentation" in tr.Text:
# Aggiungi collegamento ipertestuale al testo
tr.ClickAction.Address = "https://www.e-iceblue.com"
# Crea una forma rettangolare e definisci posizione e dimensioni dell'immagine
rect = RectangleF.FromLTRB(400, 380, 660, 450)
# Aggiungi un'immagine alla diapositiva e imposta posizione e dimensioni
image = slide.Shapes.AppendEmbedImageByPath(ShapeType.Rectangle, "/Logo1.png", rect)
# Inserisci un collegamento ipertestuale all'immagine
hyperlink = ClickHyperlink("https://www.e-iceblue.com")
image.Click = hyperlink
# Salva la presentazione modificata
presentation.SaveToFile("/output/AddHyperlinks_Output.pptx", FileFormat.Pptx2013)
presentation.Dispose()
L'immagine seguente mostra il file PowerPoint risultante con i collegamenti ipertestuali inseriti:

Domande frequenti (FAQ) sull'inserimento di collegamenti ipertestuali in PowerPoint
Come posso modificare o rimuovere un collegamento ipertestuale in PowerPoint?
Fai clic con il tasto destro del mouse sul testo, sull'immagine o sulla forma collegata. Seleziona Modifica collegamento per cambiare l'URL di destinazione, oppure fai clic su Rimuovi collegamento per convertire l'elemento nuovamente in contenuto statico.
I collegamenti ipertestuali funzioneranno ancora dopo la conversione di PowerPoint in PDF?
La maggior parte dei collegamenti ipertestuali web viene preservata durante la conversione da PowerPoint a PDF. I collegamenti di navigazione interna alle diapositive dipendono dallo strumento di conversione e dalla compatibilità del visualizzatore PDF.
Perché PowerPoint mostra un avviso di sicurezza quando si fa clic su un collegamento video?
PowerPoint attiva avvisi di sicurezza predefiniti ogni volta che un elemento tenta di avviare browser web esterni o eseguibili locali. Puoi fare clic in sicurezza su Sì per procedere, oppure regolare le tue impostazioni in File > Opzioni > Centro protezione > Impostazioni Centro protezione per personalizzare gli avvisi sui collegamenti.
In sintesi
L'aggiunta di collegamenti ipertestuali in PowerPoint aiuta a creare presentazioni più interattive e facili da usare. Per attività semplici, puoi utilizzare gli strumenti integrati di PowerPoint per collegare testo, immagini, video o diapositive. Quando lavori con presentazioni di grandi dimensioni, Free Spire.Presentation fornisce un modo programmatico per automatizzare la creazione di collegamenti ipertestuali. Prima di condividere la tua presentazione, ricorda di testare tutti i collegamenti in modalità presentazione per assicurarti che funzionino come previsto.
Leggi anche:
Comment insérer des liens hypertexte dans PowerPoint [Guide détaillé]

Les hyperliens peuvent rendre les présentations PowerPoint plus faciles à naviguer et plus attrayantes pour le public. Au lieu de créer des diapositives surchargées de texte, l'ajout d'hyperliens permet de garder une mise en page épurée tout en offrant aux spectateurs un accès instantané à des ressources externes. Dans ce guide, vous apprendrez comment insérer des hyperliens dans PowerPoint, en couvrant à la fois les opérations manuelles dans Microsoft PowerPoint et l'automatisation via Python pour le texte, les images et d'autres éléments visuels.
- Comment insérer des hyperliens dans PowerPoint
- Scénarios pratiques : Lier des images et des vidéos en ligne
- Insérer un hyperlien dans des présentations PowerPoint avec Python
- FAQ
Comment insérer des hyperliens dans PowerPoint
Dans PowerPoint, les hyperliens pointent généralement vers des fichiers externes, des pages web ou des diapositives spécifiques au sein de la présentation. Heureusement, les étapes fondamentales sont les mêmes quel que soit le type de cible. Avec Microsoft PowerPoint, vous pouvez ajouter un hyperlien sur du texte ou des images en seulement trois étapes simples.
Suivez ces étapes pour insérer des hyperliens dans PowerPoint :
- Étape 1 : Sélectionnez l'objet en cliquant pour mettre en surbrillance le mot, l'image, la forme ou l'icône que vous souhaitez rendre cliquable.
- Étape 2 : Allez dans le ruban supérieur et cliquez sur Insertion > Liens > Lien.

- Étape 3 : Dans la boîte de dialogue qui s'affiche, définissez votre destination cible :

- Fichier ou page web existant : Collez une URL externe (par ex. https://example.com) ou sélectionnez un fichier local sur votre ordinateur.
- Emplacement dans ce document : Choisissez un numéro de diapositive spécifique ou un titre à l'intérieur de votre présentation actuelle.
- Adresse électronique : Configurez un lien mailto: automatique pour des réponses rapides par e-mail.
Scénarios pratiques : Lier des images et des vidéos en ligne
Au-delà des liens de base, les hyperliens sont également utiles pour créer des logos interactifs, des boutons de navigation et des présentations vidéo légères.
1 : Logos interactifs et icônes de navigation
L'ajout d'hyperliens sur des logos et des graphiques les transforme d'éléments visuels en outils de navigation fonctionnels, renforçant l'identité de la marque tout en gardant la présentation PowerPoint interactive.
- Autorité de la marque : Liez votre logo d'entreprise directement au site officiel, à la page de destination du produit ou à la boutique en ligne afin que les spectateurs puissent explorer votre marque instantanément.
- Navigation personnalisée : Liez des icônes "Accueil", "Menu" ou "Retour en haut" à la diapositive 1 ou à une page d'index pour des sauts rapides et flexibles lors de sessions de questions-réponses en direct.
2 : Partage de vidéos en ligne léger
L'insertion de fichiers vidéo directement dans PowerPoint augmente souvent la taille des fichiers, rendant les présentations difficiles à envoyer par e-mail ou à lire de manière fluide sur du matériel ancien.
Pour garder votre présentation légère :
- Insérez une image de bouton de lecture ou un appel à l'action textuel (par ex. "Regarder la démo complète").
- Appliquez un hyperlien pointant vers l'URL de votre vidéo sur YouTube, Vimeo ou un service de stockage cloud.
Conseil : Vidéos avec hyperlien vs Vidéos incorporées
Lors du partage de vidéos dans PowerPoint, vous pouvez soit créer un lien vers une vidéo externe, soit incorporer le fichier vidéo directement. Le choix de la méthode dépend de vos limites de taille de fichier et de la configuration de votre présentation :
- Vidéo avec hyperlien : Renvoie directement à une URL web (par ex. YouTube) ou à un chemin de fichier local. Elle s'ouvre dans un navigateur web, ce qui maintient la taille de la présentation minimale et facilite l'envoi par e-mail.
- Vidéo incorporée : Intègre le fichier vidéo réel dans la présentation. Elle est lue directement dans le cadre de la diapositive sans dépendance à Internet, mais augmente considérablement la taille du fichier.
Insérer un hyperlien dans des présentations PowerPoint sans effort avec Python
L'insertion manuelle d'hyperliens fonctionne bien pour les petites présentations. Cependant, lors du traitement de centaines de diapositives ou de la génération dynamique de présentations, l'automatisation devient plus efficace. Pour rationaliser les flux de travail, les développeurs peuvent utiliser Free Spire.Presentation for Python pour ajouter des hyperliens automatiquement. Free Spire.Presentation fournit des API pour ajouter des hyperliens à du texte, des images et des formes par programmation, facilitant ainsi l'automatisation du traitement de présentations à grande échelle.
Ajout d'hyperliens au texte
Les hyperliens textuels sont appliqués au niveau du TextRange dans le cadre de texte d'une forme. En parcourant les paragraphes et les plages de texte, vous pouvez localiser des mots-clés spécifiques et définir leur URL cible via ClickAction.Address.
Ajout d'hyperliens aux images ou aux formes
Pour les éléments visuels tels que les formes ou les images incorporées, les hyperliens sont appliqués au niveau de l'objet forme. Vous pouvez instancier un objet ClickHyperlink avec votre URL de destination et l'assigner directement à la propriété .Click de l'image.
Exemple de code Python complet
Cet exemple de code montre comment insérer des hyperliens pour du texte et une image dans une présentation PowerPoint :
from spire.presentation import *
from spire.presentation.common import *
# Créer un nouvel objet Presentation et charger un fichier PowerPoint
presentation = Presentation()
presentation.LoadFromFile("/sample.pptx")
# Obtenir la première diapositive
slide = presentation.Slides[0]
# Insérer un hyperlien sur du texte
for shape in slide.Shapes:
if isinstance(shape, IAutoShape):
for para in shape.TextFrame.Paragraphs:
for tr in para.TextRanges:
# Trouver le mot-clé spécifié
if "Spire.Presentation" in tr.Text:
# Ajouter un hyperlien au texte
tr.ClickAction.Address = "https://www.e-iceblue.com"
# Créer une forme rectangulaire et définir la position et la taille de l'image
rect = RectangleF.FromLTRB(400, 380, 660, 450)
# Ajouter une image à la diapositive et définir sa position et sa taille
image = slide.Shapes.AppendEmbedImageByPath(ShapeType.Rectangle, "/Logo1.png", rect)
# Insérer un hyperlien sur l'image
hyperlink = ClickHyperlink("https://www.e-iceblue.com")
image.Click = hyperlink
# Enregistrer la présentation modifiée
presentation.SaveToFile("/output/AddHyperlinks_Output.pptx", FileFormat.Pptx2013)
presentation.Dispose()
L'image suivante montre le fichier PowerPoint résultant avec les hyperliens insérés :

FAQ sur l'insertion d'hyperliens dans PowerPoint
Comment modifier ou supprimer un hyperlien dans PowerPoint ?
Faites un clic droit sur le texte, l'image ou la forme lié(e). Sélectionnez Modifier le lien pour changer l'URL cible, ou cliquez sur Supprimer le lien pour convertir l'élément en contenu statique.
Les hyperliens fonctionneront-ils après la conversion de PowerPoint en PDF ?
La plupart des hyperliens web sont préservés lors de la conversion de PowerPoint en PDF. Les liens de navigation interne entre diapositives dépendent de l'outil de conversion et de la compatibilité du lecteur PDF.
Pourquoi PowerPoint affiche-t-il un avertissement de sécurité lors du clic sur un lien vidéo ?
PowerPoint déclenche des alertes de sécurité par défaut chaque fois qu'un élément tente de lancer des navigateurs web externes ou des exécutables locaux. Vous pouvez cliquer en toute sécurité sur Oui pour continuer, ou ajuster vos paramètres sous Fichier > Options > Centre de gestion de la confidentialité > Paramètres du Centre de gestion de la confidentialité pour personnaliser les avertissements liés aux liens.
En résumé
L'ajout d'hyperliens dans PowerPoint aide à créer des présentations plus interactives et conviviales. Pour des tâches simples, vous pouvez utiliser les outils intégrés de PowerPoint pour lier du texte, des images, des vidéos ou des diapositives. Lorsque vous travaillez avec de grandes présentations, Free Spire.Presentation offre un moyen programmatique d'automatiser la création d'hyperliens. Avant de partager votre présentation, n'oubliez pas de tester tous les liens en mode diaporama pour vous assurer qu'ils fonctionnent comme prévu.
À lire aussi :
Cómo insertar hipervínculos en PowerPoint [Guía detallada]

Los hipervínculos pueden hacer que las presentaciones de PowerPoint sean más fáciles de navegar y más atractivas para el público. En lugar de crear diapositivas cargadas de texto, añadir hipervínculos ayuda a mantener un diseño limpio y permite a los espectadores acceder a recursos externos al instante. En esta guía, aprenderá cómo insertar hipervínculos en PowerPoint, cubriendo tanto las operaciones manuales en Microsoft PowerPoint como la automatización mediante Python para texto, imágenes y otros elementos visuales.
- Cómo insertar hipervínculos en PowerPoint
- Escenarios prácticos: Enlazar imágenes y videos en línea
- Insertar un hipervínculo en presentaciones de PowerPoint con Python
- Preguntas frecuentes
Cómo insertar hipervínculos en PowerPoint
En PowerPoint, los hipervínculos suelen apuntar a archivos externos, páginas web o diapositivas específicas dentro de la presentación. Afortunadamente, los pasos principales son los mismos independientemente del tipo de destino. Con Microsoft PowerPoint, puede añadir un hipervínculo en texto o imágenes en solo tres sencillos pasos.
Siga estos pasos para insertar hipervínculos en PowerPoint:
- Paso 1: Seleccione el objeto haciendo clic para resaltar la palabra, imagen, forma o icono que desea hacer clicable.
- Paso 2: Vaya a la cinta de opciones superior y haga clic en Insertar > Vínculos > Vínculo.

- Paso 3: En el cuadro de diálogo emergente, establezca su destino:

- Archivo o página web existente: Pegue una URL externa (por ejemplo, https://example.com) o seleccione un archivo local en su computadora.
- Lugar de este documento: Elija un número de diapositiva específico o un título dentro de su presentación actual.
- Dirección de correo electrónico: Configure un enlace mailto: automático para respuestas rápidas por correo electrónico.
Escenarios prácticos: Enlazar imágenes y videos en línea
Más allá de los enlaces básicos, los hipervínculos también son útiles para crear logotipos interactivos, botones de navegación y presentaciones de video ligeras.
1: Logotipos interactivos e iconos de navegación
Añadir hipervínculos a logotipos y gráficos los transforma de elementos visuales en herramientas de navegación funcionales, mejorando la identidad de marca mientras se mantiene la interactividad de la presentación de PowerPoint.
- Autoridad de marca: Enlace el logotipo de su empresa directamente al sitio web oficial, página de destino del producto o tienda en línea para que los espectadores puedan explorar su marca al instante.
- Navegación personalizada: Enlace iconos de inicio, menú o "volver arriba" a la diapositiva 1 o a una página de índice para saltar de forma rápida y flexible durante sesiones de preguntas y respuestas en vivo.
2: Compartir videos en línea de forma ligera
Insertar archivos de video directamente en PowerPoint a menudo aumenta el tamaño de los archivos, lo que dificulta enviarlos por correo electrónico o ejecutarlos sin problemas en hardware antiguo.
Para mantener su presentación ligera:
- Inserte una imagen de botón de reproducción o una llamada a la acción de texto (por ejemplo, "Ver demostración completa").
- Aplique un hipervínculo que apunte a la URL de su video en YouTube, Vimeo o almacenamiento en la nube.
Consejo: Videos con hipervínculo vs. Videos incrustados
Al compartir videos en PowerPoint, puede enlazar a un video externo o incrustar el archivo de video directamente. Elegir el método correcto depende de los límites de tamaño de archivo y la configuración de su presentación:
- Video con hipervínculo: Enlaza directamente a una URL web (por ejemplo, YouTube) o a una ruta de archivo local. Se abre en un navegador web, manteniendo el tamaño de la presentación al mínimo y facilitando su envío por correo electrónico.
- Video incrustado: Integra el archivo de video real en la presentación. Se reproduce directamente dentro del marco de la diapositiva sin depender de internet, pero aumenta significativamente el tamaño del archivo.
Insertar un hipervínculo en presentaciones de PowerPoint sin esfuerzo con Python
La inserción manual de hipervínculos funciona bien para presentaciones pequeñas. Sin embargo, al procesar cientos de diapositivas o generar presentaciones dinámicamente, la automatización se vuelve más eficiente. Para optimizar los flujos de trabajo, los desarrolladores pueden utilizar Free Spire.Presentation for Python para añadir hipervínculos automáticamente. Free Spire.Presentation proporciona API para añadir hipervínculos a texto, imágenes y formas mediante programación, facilitando la automatización del procesamiento de presentaciones a gran escala.
Añadir hipervínculos al texto
Los hipervínculos de texto se aplican a nivel de TextRange dentro del marco de texto de una forma. Al iterar a través de párrafos y rangos de texto, puede localizar palabras clave específicas y establecer su URL de destino a través de ClickAction.Address.
Añadir hipervínculos a imágenes o formas
Para elementos visuales como formas o imágenes incrustadas, los hipervínculos se aplican a nivel de objeto de forma. Puede instanciar un objeto ClickHyperlink con su URL de destino y asignarlo directamente a la propiedad .Click de la imagen.
Ejemplo completo de código en Python
Este ejemplo de código muestra cómo insertar hipervínculos para texto y una imagen en una presentación de PowerPoint:
from spire.presentation import *
from spire.presentation.common import *
# Crear un nuevo objeto de presentación y cargar un archivo de PowerPoint
presentation = Presentation()
presentation.LoadFromFile("/sample.pptx")
# Obtener la primera diapositiva
slide = presentation.Slides[0]
# Insertar hipervínculo al texto
for shape in slide.Shapes:
if isinstance(shape, IAutoShape):
for para in shape.TextFrame.Paragraphs:
for tr in para.TextRanges:
# Buscar la palabra clave de texto especificada
if "Spire.Presentation" in tr.Text:
# Añadir hipervínculo al texto
tr.ClickAction.Address = "https://www.e-iceblue.com"
# Crear una forma rectangular y definir la posición y el tamaño de la imagen
rect = RectangleF.FromLTRB(400, 380, 660, 450)
# Adjuntar una imagen a la diapositiva y establecer su posición y tamaño
image = slide.Shapes.AppendEmbedImageByPath(ShapeType.Rectangle, "/Logo1.png", rect)
# Insertar un hipervínculo a la imagen
hyperlink = ClickHyperlink("https://www.e-iceblue.com")
image.Click = hyperlink
# Guardar la presentación modificada
presentation.SaveToFile("/output/AddHyperlinks_Output.pptx", FileFormat.Pptx2013)
presentation.Dispose()
La siguiente imagen muestra el archivo de PowerPoint resultante con los hipervínculos insertados:

Preguntas frecuentes sobre la inserción de hipervínculos en PowerPoint
¿Cómo edito o elimino un hipervínculo en PowerPoint?
Haga clic derecho sobre el texto, imagen o forma enlazada. Seleccione Editar vínculo para cambiar la URL de destino, o haga clic en Quitar vínculo para convertir el elemento de nuevo en contenido estático.
¿Seguirán funcionando los hipervínculos después de convertir PowerPoint a PDF?
La mayoría de los hipervínculos web se conservan durante la conversión de PowerPoint a PDF. Los enlaces internos de navegación entre diapositivas dependen de la herramienta de conversión y de la compatibilidad del visor de PDF.
¿Por qué PowerPoint muestra una advertencia de seguridad al hacer clic en un enlace de video?
PowerPoint activa alertas de seguridad predeterminadas siempre que un elemento intenta iniciar navegadores web externos o ejecutables locales. Puede hacer clic de forma segura en Sí para continuar, o ajustar su configuración en Archivo > Opciones > Centro de confianza > Configuración del Centro de confianza para personalizar las advertencias de enlaces.
En resumen
Añadir hipervínculos en PowerPoint ayuda a crear presentaciones más interactivas y fáciles de usar. Para tareas sencillas, puede utilizar las herramientas integradas de PowerPoint para enlazar texto, imágenes, videos o diapositivas. Cuando trabaje con presentaciones grandes, Free Spire.Presentation proporciona una forma programática de automatizar la creación de hipervínculos. Antes de compartir su presentación, recuerde probar todos los enlaces en modo presentación para asegurarse de que funcionan como se espera.
Lea también:
So fügen Sie Hyperlinks in PowerPoint ein [Detaillierte Anleitung]
Inhaltsverzeichnis

Hyperlinks können PowerPoint-Präsentationen einfacher navigierbar und für das Publikum ansprechender gestalten. Anstatt textlastige Folien zu erstellen, hilft das Hinzufügen von Hyperlinks dabei, Ihr Layout übersichtlich zu halten und den Zuschauern gleichzeitig sofortigen Zugriff auf externe Ressourcen zu ermöglichen. In dieser Anleitung erfahren Sie, wie Sie Hyperlinks in PowerPoint einfügen. Dabei werden sowohl die manuellen Schritte in Microsoft PowerPoint als auch die Automatisierung mit Python für Text, Bilder und andere visuelle Elemente behandelt.
- So fügen Sie Hyperlinks in PowerPoint ein
- Praktische Szenarien: Verknüpfung von Bildern und Online-Videos
- Hyperlinks in PowerPoint-Präsentationen mit Python einfügen
- Häufig gestellte Fragen (FAQs)
So fügen Sie Hyperlinks in PowerPoint ein
In PowerPoint verweisen Hyperlinks normalerweise auf externe Dateien, Webseiten oder bestimmte Folien innerhalb der Präsentation. Glücklicherweise sind die grundlegenden Schritte unabhängig vom Zieltyp gleich. Mit Microsoft PowerPoint können Sie in nur drei einfachen Schritten einen Hyperlink in Text oder Bilder einfügen.
Befolgen Sie diese Schritte, um Hyperlinks in PowerPoint einzufügen:
- Schritt 1: Wählen Sie das Objekt aus, indem Sie auf das Textwort, das Bild, die Form oder das Symbol klicken, das anklickbar sein soll.
- Schritt 2: Gehen Sie zum oberen Menüband und klicken Sie auf Einfügen > Links > Link.

- Schritt 3: Legen Sie im aufklappenden Dialogfeld Ihr Ziel fest:

- Datei oder Webseite: Fügen Sie eine externe URL ein (z. B. https://example.com) oder wählen Sie eine lokale Datei auf Ihrem Computer aus.
- Aktuelles Dokument: Wählen Sie eine bestimmte Foliennummer oder einen Titel innerhalb Ihrer aktuellen Präsentation aus.
- E-Mail-Adresse: Konfigurieren Sie einen automatischen mailto:-Link für schnelle E-Mail-Antworten.
Praktische Szenarien: Verknüpfung von Bildern und Online-Videos
Über einfache Links hinaus sind Hyperlinks auch nützlich, um interaktive Logos, Navigationsschaltflächen und leichtgewichtige Videopräsentationen zu erstellen.
1: Interaktive Logos und Navigationssymbole
Das Hinzufügen von Hyperlinks zu Logos und Grafiken verwandelt diese von reinen visuellen Elementen in funktionale Navigationswerkzeuge, was die Markenidentität stärkt und die PowerPoint-Präsentation interaktiv hält.
- Markenautorität: Verlinken Sie Ihr Firmenlogo direkt mit der offiziellen Website, der Produkt-Landingpage oder dem Online-Shop, damit die Zuschauer Ihre Marke sofort erkunden können.
- Benutzerdefinierte Navigation: Verlinken Sie Start-, Menü- oder Zurück-nach-oben-Symbole mit Folie 1 oder einer Indexseite für schnelles und flexibles Springen während Live-Fragerunden.
2: Leichtgewichtiges Teilen von Online-Videos
Das Einfügen von Videodateien direkt in PowerPoint erhöht oft die Dateigröße, was es schwierig macht, Präsentationen per E-Mail zu versenden oder auf älterer Hardware reibungslos abzuspielen.
Um Ihre Präsentation leicht zu halten:
- Fügen Sie ein Bild mit einer Wiedergabetaste oder einen Text-Callout ein (z. B. "Vollständige Demo ansehen").
- Fügen Sie einen Hyperlink hinzu, der auf Ihre Video-URL bei YouTube, Vimeo oder einem Cloud-Speicher verweist.
Tipp: Verlinkte vs. eingebettete Videos
Beim Teilen von Videos in PowerPoint können Sie entweder auf ein externes Video verlinken oder die Videodatei direkt einbetten. Die Wahl der richtigen Methode hängt von Ihren Dateigrößenbeschränkungen und dem Präsentations-Setup ab:
- Verlinktes Video: Verweist direkt auf eine Web-URL (z. B. YouTube) oder einen lokalen Dateipfad. Es öffnet sich in einem Webbrowser, wodurch die Größe der Präsentation minimal bleibt und sie leicht per E-Mail versendet werden kann.
- Eingebettetes Video: Integriert die eigentliche Videodatei in die Präsentation. Es wird direkt innerhalb des Folienrahmens abgespielt, ohne dass eine Internetverbindung erforderlich ist, erhöht jedoch die Dateigröße erheblich.
Hyperlinks in PowerPoint-Präsentationen mühelos mit Python einfügen
Das manuelle Einfügen von Hyperlinks funktioniert gut bei kleinen Präsentationen. Wenn Sie jedoch Hunderte von Folien verarbeiten oder Präsentationen dynamisch generieren, ist Automatisierung effizienter. Um Arbeitsabläufe zu optimieren, können Entwickler Free Spire.Presentation for Python verwenden, um Hyperlinks automatisch hinzuzufügen. Free Spire.Presentation bietet APIs zum programmatischen Hinzufügen von Hyperlinks zu Text, Bildern und Formen, was die Automatisierung der großflächigen Präsentationsverarbeitung erleichtert.
Hinzufügen von Hyperlinks zu Text
Text-Hyperlinks werden auf der Ebene von TextRange innerhalb des Textrahmens einer Form angewendet. Durch das Durchlaufen von Absätzen und Textbereichen können Sie bestimmte Schlüsselwörter finden und deren Ziel-URL über ClickAction.Address festlegen.
Hinzufügen von Hyperlinks zu Bildern oder Formen
Bei visuellen Elementen wie Formen oder eingebetteten Bildern werden Hyperlinks auf der Ebene des Formobjekts angewendet. Sie können ein ClickHyperlink-Objekt mit Ihrer Ziel-URL instanziieren und es direkt der .Click-Eigenschaft des Bildes zuweisen.
Vollständiges Python-Codebeispiel
Dieses Codebeispiel zeigt, wie man Hyperlinks für Text und ein Bild in einer PowerPoint-Präsentation einfügt:
from spire.presentation import *
from spire.presentation.common import *
# Erstellen eines neuen Präsentationsobjekts und Laden einer PowerPoint-Datei
presentation = Presentation()
presentation.LoadFromFile("/sample.pptx")
# Abrufen der ersten Folie
slide = presentation.Slides[0]
# Hyperlink zu Text hinzufügen
for shape in slide.Shapes:
if isinstance(shape, IAutoShape):
for para in shape.TextFrame.Paragraphs:
for tr in para.TextRanges:
# Suchen des angegebenen Text-Schlüsselworts
if "Spire.Presentation" in tr.Text:
# Hyperlink zum Text hinzufügen
tr.ClickAction.Address = "https://www.e-iceblue.com"
# Erstellen einer Rechteckform und Definieren von Bildposition und -größe
rect = RectangleF.FromLTRB(400, 380, 660, 450)
# Anhängen eines Bildes an die Folie und Festlegen von Position und Größe
image = slide.Shapes.AppendEmbedImageByPath(ShapeType.Rectangle, "/Logo1.png", rect)
# Einfügen eines Hyperlinks zum Bild
hyperlink = ClickHyperlink("https://www.e-iceblue.com")
image.Click = hyperlink
# Speichern der geänderten Präsentation
presentation.SaveToFile("/output/AddHyperlinks_Output.pptx", FileFormat.Pptx2013)
presentation.Dispose()
Das folgende Bild zeigt die resultierende PowerPoint-Datei mit eingefügten Hyperlinks:

Häufig gestellte Fragen (FAQs) zum Einfügen von Hyperlinks in PowerPoint
Wie bearbeite oder entferne ich einen Hyperlink in PowerPoint?
Klicken Sie mit der rechten Maustaste auf den verlinkten Text, das Bild oder die Form. Wählen Sie Link bearbeiten, um die Ziel-URL zu ändern, oder klicken Sie auf Link entfernen, um das Element wieder in statischen Inhalt umzuwandeln.
Funktionieren Hyperlinks nach der Konvertierung von PowerPoint in PDF noch?
Die meisten Web-Hyperlinks bleiben bei der Konvertierung von PowerPoint in PDF erhalten. Interne Folien-Navigationslinks hängen vom Konvertierungstool und der Kompatibilität des PDF-Viewers ab.
Warum zeigt PowerPoint eine Sicherheitswarnung an, wenn ich auf einen Videolink klicke?
PowerPoint löst standardmäßige Sicherheitswarnungen aus, wenn ein Element versucht, externe Webbrowser oder lokale ausführbare Dateien zu starten. Sie können sicher auf Ja klicken, um fortzufahren, oder Ihre Einstellungen unter Datei > Optionen > Trust Center > Einstellungen für das Trust Center anpassen, um Link-Warnungen anzupassen.
Fazit
Das Hinzufügen von Hyperlinks in PowerPoint hilft dabei, interaktivere und benutzerfreundlichere Präsentationen zu erstellen. Für einfache Aufgaben können Sie die integrierten Tools von PowerPoint verwenden, um Text, Bilder, Videos oder Folien zu verknüpfen. Bei der Arbeit mit großen Präsentationen bietet Free Spire.Presentation eine programmatische Möglichkeit, die Erstellung von Hyperlinks zu automatisieren. Denken Sie vor dem Teilen Ihrer Präsentation daran, alle Links im Bildschirmpräsentationsmodus zu testen, um sicherzustellen, dass sie wie erwartet funktionieren.
Lesen Sie auch:
Как вставить гиперссылки в PowerPoint [Подробное руководство]

Гиперссылки могут сделать презентации PowerPoint более удобными для навигации и интересными для аудитории. Вместо создания перегруженных текстом слайдов, добавление гиперссылок помогает сохранить чистоту макета, позволяя зрителям мгновенно получать доступ к внешним ресурсам. В этом руководстве вы узнаете, как вставить гиперссылки в PowerPoint, включая как ручные операции в Microsoft PowerPoint, так и автоматизацию с помощью Python для текста, изображений и других визуальных элементов.
- Как вставить гиперссылки в PowerPoint
- Практические сценарии: ссылки на изображения и онлайн-видео
- Вставка гиперссылки в презентации PowerPoint с помощью Python
- Часто задаваемые вопросы (FAQ)
Как вставить гиперссылки в PowerPoint
В PowerPoint гиперссылки обычно указывают на внешние файлы, веб-страницы или конкретные слайды внутри презентации. К счастью, основные шаги одинаковы независимо от типа цели. В Microsoft PowerPoint вы можете добавить гиперссылку в текст или изображение всего за три простых шага.
Выполните следующие действия, чтобы вставить гиперссылки в PowerPoint:
- Шаг 1: Выберите объект, щелкнув по нему, чтобы выделить слово, изображение, фигуру или значок, которые вы хотите сделать кликабельными.
- Шаг 2: Перейдите на верхнюю ленту и нажмите Вставка > Ссылки > Ссылка.

- Шаг 3: В появившемся диалоговом окне установите целевой адрес:

- Файл, веб-страница: Вставьте внешний URL-адрес (например, https://example.com) или выберите локальный файл на вашем компьютере.
- Место в документе: Выберите конкретный номер слайда или заголовок внутри текущей презентации.
- Электронная почта: Настройте автоматическую ссылку mailto: для быстрой отправки писем.
Практические сценарии: ссылки на изображения и онлайн-видео
Помимо базовых ссылок, гиперссылки также полезны для создания интерактивных логотипов, кнопок навигации и облегченных видеопрезентаций.
1: Интерактивные логотипы и значки навигации
Добавление гиперссылок к логотипам и графике превращает их из визуальных элементов в функциональные инструменты навигации, укрепляя фирменный стиль и сохраняя интерактивность презентации PowerPoint.
- Авторитет бренда: Ссылайтесь на логотип вашей компании напрямую на официальный сайт, целевую страницу продукта или интернет-магазин, чтобы зрители могли мгновенно ознакомиться с вашим брендом.
- Пользовательская навигация: Привязывайте значки «Домой», «Меню» или «Наверх» к первому слайду или странице с оглавлением для быстрого и гибкого перемещения во время сессий вопросов и ответов.
2: Легкий обмен онлайн-видео
Вставка видеофайлов напрямую в PowerPoint часто увеличивает размер файла, из-за чего презентации становится трудно отправлять по электронной почте или запускать на старом оборудовании.
Чтобы сохранить легкость презентации:
- Вставьте изображение кнопки воспроизведения или текстовую выноску (например, "Смотреть полную демонстрацию").
- Примените гиперссылку, указывающую на URL-адрес вашего видео на YouTube, Vimeo или в облачном хранилище.
Совет: Гиперссылки против встроенных видео
При обмене видео в PowerPoint вы можете либо дать ссылку на внешнее видео, либо встроить видеофайл напрямую. Выбор правильного метода зависит от ограничений размера файла и настроек презентации:
- Видео по гиперссылке: Ссылается напрямую на веб-адрес (например, YouTube) или путь к локальному файлу. Оно открывается в веб-браузере, сохраняя минимальный размер презентации, что удобно для отправки по почте.
- Встроенное видео: Интегрирует сам видеофайл в презентацию. Оно воспроизводится прямо внутри слайда без необходимости подключения к интернету, но значительно увеличивает размер файла.
Вставка гиперссылки в презентации PowerPoint с помощью Python
Ручная вставка гиперссылок хорошо подходит для небольших презентаций. Однако при обработке сотен слайдов или динамической генерации презентаций автоматизация становится более эффективной. Для оптимизации рабочих процессов разработчики могут использовать Free Spire.Presentation for Python для автоматического добавления гиперссылок. Free Spire.Presentation предоставляет API для программного добавления гиперссылок к тексту, изображениям и фигурам, что упрощает автоматизацию обработки крупномасштабных презентаций.
Добавление гиперссылок к тексту
Текстовые гиперссылки применяются на уровне TextRange внутри текстового фрейма фигуры. Перебирая абзацы и текстовые диапазоны, вы можете найти определенные ключевые слова и задать их целевой URL через ClickAction.Address.
Добавление гиперссылок к изображениям или фигурам
Для визуальных элементов, таких как фигуры или встроенные изображения, гиперссылки применяются на уровне объекта фигуры. Вы можете создать объект ClickHyperlink с вашим целевым URL-адресом и напрямую назначить его свойству .Click изображения.
Пример полного кода на Python
Этот пример кода показывает, как вставить гиперссылки для текста и изображения в презентации PowerPoint:
from spire.presentation import *
from spire.presentation.common import *
# Создать новый объект Presentation и загрузить файл PowerPoint
presentation = Presentation()
presentation.LoadFromFile("/sample.pptx")
# Получить первый слайд
slide = presentation.Slides[0]
# Вставить гиперссылку в текст
for shape in slide.Shapes:
if isinstance(shape, IAutoShape):
for para in shape.TextFrame.Paragraphs:
for tr in para.TextRanges:
# Найти указанное ключевое слово
if "Spire.Presentation" in tr.Text:
# Добавить гиперссылку к тексту
tr.ClickAction.Address = "https://www.e-iceblue.com"
# Создать прямоугольную фигуру и определить положение и размер изображения
rect = RectangleF.FromLTRB(400, 380, 660, 450)
# Добавить изображение на слайд и установить его положение и размер
image = slide.Shapes.AppendEmbedImageByPath(ShapeType.Rectangle, "/Logo1.png", rect)
# Вставить гиперссылку в изображение
hyperlink = ClickHyperlink("https://www.e-iceblue.com")
image.Click = hyperlink
# Сохранить измененную презентацию
presentation.SaveToFile("/output/AddHyperlinks_Output.pptx", FileFormat.Pptx2013)
presentation.Dispose()
На следующем изображении показан результирующий файл PowerPoint со вставленными гиперссылками:

Часто задаваемые вопросы (FAQ) о вставке гиперссылок в PowerPoint
Как отредактировать или удалить гиперссылку в PowerPoint?
Щелкните правой кнопкой мыши по связанному тексту, изображению или фигуре. Выберите Изменить гиперссылку, чтобы изменить целевой URL, или нажмите Удалить гиперссылку, чтобы вернуть элемент в состояние обычного контента.
Будут ли гиперссылки работать после преобразования PowerPoint в PDF?
Большинство веб-гиперссылок сохраняются при преобразовании PowerPoint в PDF. Внутренние ссылки для навигации по слайдам зависят от инструмента преобразования и совместимости программы для просмотра PDF.
Почему PowerPoint показывает предупреждение безопасности при нажатии на ссылку видео?
PowerPoint вызывает стандартные предупреждения безопасности всякий раз, когда элемент пытается запустить внешние веб-браузеры или локальные исполняемые файлы. Вы можете смело нажать Да, чтобы продолжить, или настроить параметры в разделе Файл > Параметры > Центр управления безопасностью > Параметры центра управления безопасностью, чтобы настроить предупреждения о ссылках.
Заключение
Добавление гиперссылок в PowerPoint помогает создавать более интерактивные и удобные для пользователя презентации. Для простых задач вы можете использовать встроенные инструменты PowerPoint для создания ссылок на текст, изображения, видео или слайды. При работе с большими презентациями Free Spire.Presentation предоставляет программный способ автоматизации создания гиперссылок. Перед тем как делиться своей презентацией, не забудьте протестировать все ссылки в режиме показа слайдов, чтобы убедиться, что они работают должным образом.
Читайте также:
Copy Excel Rows, Columns, and Cells with Formatting in React
Copying data within Excel files while preserving formatting is a common requirement in web-based spreadsheet applications. Spire.XLS for JavaScript runs entirely in the browser via WebAssembly, using a virtual file system (VFS) to manage input and output files — no backend server required. It provides comprehensive APIs to copy rows, columns, and cell ranges while keeping the original styles, fonts, colors, and other formatting intact.
This article covers three core features:
For installation and project setup, refer to Integrating Spire.XLS for JavaScript in a React Project. The examples below assume Spire.XLS is installed and the WebAssembly module is initialized.
Copy Rows in Excel
With Spire.XLS for JavaScript, you can copy rows within the same worksheet or across different worksheets while preserving all formatting, formulas, and styles. This is useful when you need to duplicate structured data such as headers, summary rows, or formatted templates. Through the CopyRangeOptions parameter, you can flexibly configure copy options such as copying all formats, conditional formatting, data validation, or only formula result values. The steps are as follows:
- Create a
Workbookobject and load an existing Excel file. - Get the source and destination worksheets via
workbook.Worksheets.get(). - Get the row to copy via
sheet.Rows[index]. - Use
sheet.Copy()with the source row, destination worksheet, destination row index, andCopyRangeOptions.Allto copy the row and its formatting. - Copy the column widths from the source row cells to the corresponding destination row cells.
- Save the workbook to an Excel file using
SaveToFile().
Below is a complete code example demonstrating how to copy rows in React:
function App() {
const copyRows = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Fetch the Excel file and add it to the Virtual File System (VFS)
let excelFileName = 'Copying.xls';
await window.spire.FetchFileToVFS(excelFileName, '', `${process.env.PUBLIC_URL}data/`);
// Create a new workbook and load an existing file
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: excelFileName });
// Get the source and destination worksheets
let sheet1 = workbook.Worksheets.get(0);
let sheet2 = workbook.Worksheets.get(1);
// Get the row to copy
let row = sheet1.Rows[0];
// Copy the row to the destination worksheet with all formatting
sheet1.Copy({ sourceRange: row, destRange: sheet2.Rows[0], copyOptions: xlsModule.CopyRangeOptions.All });
// Copy the column widths from source row to destination row
let columns = sheet1.Columns.length;
for (let i = 0; i < columns; i++) {
let columnWidth = row.Columns[i].ColumnWidth;
sheet2.Rows[0].Columns[i].ColumnWidth = columnWidth;
}
// Save the workbook
const outputFileName = 'CopyRows_out.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Copy Excel Rows</h1>
<button onClick={copyRows}>
Generate
</button>
</div>
);
}
export default App;
Row copy result

Copy Columns in Excel
Copying columns is equally straightforward with Spire.XLS for JavaScript. You can duplicate a column within the same worksheet or copy it to another sheet, and all cell styles, number formats, and data will be preserved. Through the CopyRangeOptions parameter, you can flexibly configure which elements to copy. This is particularly helpful for reorganizing spreadsheet layouts or replicating data structures. The steps are as follows:
- Create a
Workbookobject and load an existing Excel file. - Get the source and destination worksheets.
- Get the column to copy via
sheet.Columns[index]. - Use
sheet.Copy()with the source column, destination worksheet, destination column index, andCopyRangeOptions.Allto copy the column and its formatting. - Copy the column widths and row heights from the source column cells to the corresponding destination column cells.
- Save the workbook to an Excel file using
SaveToFile().
Below is a complete code example demonstrating how to copy columns in React:
function App() {
const copyColumns = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Fetch the Excel file and add it to the Virtual File System (VFS)
let excelFileName = 'Copying.xls';
await window.spire.FetchFileToVFS(excelFileName, '', `${process.env.PUBLIC_URL}data/`);
// Create a new workbook and load an existing file
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: excelFileName });
// Get the source and destination worksheets
let sheet1 = workbook.Worksheets.get(0);
let sheet2 = workbook.Worksheets.get(1);
// Get the column to copy
let column = sheet1.Columns[0];
// Copy the column to the destination worksheet with all formatting
sheet1.Copy({ sourceRange: column, destRange: sheet2.Columns[0], copyOptions: xlsModule.CopyRangeOptions.All });
// Copy the column width and row heights from source column to destination column
sheet2.Columns[0].ColumnWidth = column.ColumnWidth;
let rows = column.Rows.length;
for (let i = 0; i < rows; i++) {
let rowHeight = column.Rows[i].RowHeight;
sheet2.Columns[0].Rows[i].RowHeight = rowHeight;
}
// Save the workbook
const outputFileName = 'CopyColumns_out.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Copy Excel Columns</h1>
<button onClick={copyColumns}>
Generate
</button>
</div>
);
}
export default App;
Column copy result

Copy Cells in Excel
Beyond copying entire rows and columns, Spire.XLS for JavaScript also allows you to copy specific cell ranges from one location to another while preserving all formatting. The CellRange.Copy() method provides this capability with flexible options. This gives you fine-grained control over which cells to duplicate. You can copy a range of cells within the same worksheet or to a different worksheet. The steps are as follows:
- Create a
Workbookobject and load an existing Excel file. - Get the source and destination worksheets.
- Get the source cell range and destination cell range via
sheet.Range.get(). - Use
sourceRange.Copy()with the destination range andCopyRangeOptions.Allto copy the cell range with all formatting. - Copy the column widths and row heights from the source range to the destination range.
- Save the workbook to an Excel file using
SaveToFile().
Below is a complete code example demonstrating how to copy cells in React:
function App() {
const copyCells = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Fetch the Excel file and add it to the Virtual File System (VFS)
let excelFileName = 'Copying.xls';
await window.spire.FetchFileToVFS(excelFileName, '', `${process.env.PUBLIC_URL}data/`);
// Create a new workbook and load an existing file
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: excelFileName });
// Get the source and destination worksheets
let sheet1 = workbook.Worksheets.get(0);
let sheet2 = workbook.Worksheets.get(1);
// Get the source cell range and destination cell range
let range1 = sheet1.Range.get("A1:E7");
let range2 = sheet2.Range.get("A1:E7");
// Copy the source range to the destination range with all formatting
range1.Copy({ destRange: range2, copyOptions: xlsModule.CopyRangeOptions.All });
// Copy the row heights and column widths from source to destination
for (let i = 0; i < range1.Rows.length; i++) {
let row = range1.Rows[i];
for (let j = 0; j < row.Columns.length; j++) {
let column = row.Columns[j];
range2.Rows[i].Columns[j].ColumnWidth = column.ColumnWidth;
range2.Rows[i].RowHeight = row.RowHeight;
}
}
// Save the workbook
const outputFileName = 'CopyCells.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Copy Excel Cells</h1>
<button onClick={copyCells}>
Generate
</button>
</div>
);
}
export default App;
Cell copy result

FAQ
What happens if the target location already contains data
Cause: By default, the Copy() method overwrites existing data at the target location without merging or preserving the original content.
Solution: Choose an empty area as the destination range, or check whether the target range is empty before performing the copy. You can also back up the target data first, then execute the copy operation.
Can I copy only values without formulas
Cause: CopyRangeOptions.All copies formulas themselves, but sometimes you only need the calculated result values without preserving the formula logic.
Solution: Use the CopyRangeOptions.OnlyCopyFormulaValue option to copy only the calculated result values, not the formulas themselves:
sourceRange.Copy({ destRange: destRange, copyOptions: xlsModule.CopyRangeOptions.OnlyCopyFormulaValue });
Get a Free License
Spire.XLS for JavaScript offers a 30-day full-featured free trial license with no functional limitations. Apply here to evaluate before purchasing.
Adjust Excel Page Setup with JavaScript in React
Configuring page setup is essential for preparing Excel documents for printing or PDF export. Spire.XLS for JavaScript runs entirely in the browser via WebAssembly, using a virtual file system (VFS) to manage input and output files — no backend server required. It provides comprehensive page setup capabilities through the PageSetup object, allowing you to control margins, orientation, paper size, print area, zoom scaling, and fit-to-page options.
The PageSetup object in Spire.XLS offers a rich set of properties for controlling how a worksheet is printed or displayed. Key properties include:
| Property | Description |
|---|---|
| TopMargin / BottomMargin / LeftMargin / RightMargin | Sets the page margins |
| Orientation | Sets the page orientation (Portrait or Landscape) |
| PaperSize | Sets the paper size (A4, Letter, etc.) |
| PrintArea | Specifies the cell range to print |
| Zoom | Sets the worksheet zoom scaling percentage |
| FitToPagesTall / FitToPagesWide | Scales the worksheet to fit a specified number of pages |
This article covers six core features:
- Adjust Excel Page Margins
- Adjust Excel Page Orientation
- Adjust Excel Paper Size
- Adjust Excel Print Area
- Adjust Excel Zoom Scale
- Fit Excel Table to 1 Page
For installation and project setup, refer to Integrating Spire.XLS for JavaScript in a React Project. The examples below assume Spire.XLS is installed and the WebAssembly module is initialized.
Adjust Excel Page Margins
Page margins define the blank space around the edges of a printed worksheet. The steps are as follows:
- Create a
Workbookobject usingnew xlsModule.Workbook(). - Get the default worksheet using the
workbook.Worksheets.get(index)method. - Access the
PageSetupobject throughsheet.PageSetup. - Set page margins using the
TopMargin,BottomMargin,LeftMargin, andRightMarginproperties. - Save the workbook to an Excel file using the
workbook.SaveToFile()method.
Below is a complete code example demonstrating how to adjust page margins in React:
function App() {
const adjustPageMargins = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a workbook and load the existing file
await window.spire.FetchFileToVFS('Sample.xlsx', '', `${process.env.PUBLIC_URL}data/`);
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: 'Sample.xlsx' });
const sheet = workbook.Worksheets.get(0);
// Get the PageSetup object
const pageSetup = sheet.PageSetup;
// Set the top, bottom, left, right, header, and footer margins
pageSetup.TopMargin = 1;
pageSetup.BottomMargin = 1;
pageSetup.LeftMargin = 0.75;
pageSetup.RightMargin = 0.75;
// Save the workbook
const outputFileName = 'AdjustMargins.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Adjust Page Margins</h1>
<button onClick={adjustPageMargins}>
Generate
</button>
</div>
);
}
export default App;
Page margins adjusted with Spire.XLS for JavaScript

Adjust Excel Page Orientation
Page orientation determines whether a worksheet is printed in portrait (vertical) or landscape (horizontal) layout. Landscape orientation is especially useful for wide tables with many columns. The steps are as follows:
- Create a
Workbookobject usingnew xlsModule.Workbook(). - Get the default worksheet using the
workbook.Worksheets.get(index)method. - Access the
PageSetupobject throughsheet.PageSetup. - Set the page orientation using the
Orientationproperty. - Save the workbook to an Excel file using the
workbook.SaveToFile()method.
Below is a complete code example demonstrating how to set the page orientation to landscape in React:
function App() {
const setPageOrientation = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a workbook and load the existing file
// Load the sample file into VFS
await window.spire.FetchFileToVFS('Sample.xlsx', '', `${process.env.PUBLIC_URL}data/`);
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: 'Sample.xlsx' });
const sheet = workbook.Worksheets.get(0);
// Set the page orientation to Landscape
sheet.PageSetup.Orientation = xlsModule.PageOrientationType.Landscape;
// Save the workbook
const outputFileName = 'SetOrientation.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Set Page Orientation</h1>
<button onClick={setPageOrientation}>
Generate
</button>
</div>
);
}
export default App;
Page orientation set to landscape with Spire.XLS for JavaScript

Adjust Excel Paper Size
Different printers and regions use different standard paper sizes. Spire.XLS for JavaScript supports a wide range of paper sizes through the PaperSizeType enumeration, including A4, Letter, A3, and many more. The steps are as follows:
- Create a
Workbookobject usingnew xlsModule.Workbook(). - Get the default worksheet using the
workbook.Worksheets.get(index)method. - Access the
PageSetupobject throughsheet.PageSetup. - Set the paper size using the
PaperSizeproperty. - Save the workbook to an Excel file using the
workbook.SaveToFile()method.
Below is a complete code example demonstrating how to set the paper size to A3 in React:
function App() {
const setPaperSize = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a workbook and load the existing file
// Load the sample file into VFS
await window.spire.FetchFileToVFS('Sample.xlsx', '', `${process.env.PUBLIC_URL}data/`);
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: 'Sample.xlsx' });
const sheet = workbook.Worksheets.get(0);
// Get the PageSetup object
const pageSetup = sheet.PageSetup;
// Set the paper size to A3
pageSetup.PaperSize = xlsModule.PaperSizeType.PaperA3;
// Save the workbook
const outputFileName = 'SetPaperSize.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Set Paper Size</h1>
<button onClick={setPaperSize}>
Generate
</button>
</div>
);
}
export default App;
Paper size set to A3 with Spire.XLS for JavaScript

Adjust Excel Print Area
The print area defines which portion of a worksheet will be printed. The steps are as follows:
- Create a
Workbookobject usingnew xlsModule.Workbook(). - Get the default worksheet using the
workbook.Worksheets.get(index)method. - Populate sample data using the
sheet.Rangeproperty. - Access the
PageSetupobject throughsheet.PageSetup. - Set the print area using the
PrintAreaproperty. - Save the workbook to an Excel file using the
workbook.SaveToFile()method.
Below is a complete code example demonstrating how to set the print area in React:
function App() {
const setPrintArea = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a workbook and load the existing file
// Load the sample file into VFS
await window.spire.FetchFileToVFS('Sample.xlsx', '', `${process.env.PUBLIC_URL}data/`);
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: 'Sample.xlsx' });
const sheet = workbook.Worksheets.get(0);
// Set the print area to A1:E3
sheet.PageSetup.PrintArea = "A1:E3";
// Save the workbook
const outputFileName = 'SetPrintArea.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Set Print Area</h1>
<button onClick={setPrintArea}>
Generate
</button>
</div>
);
}
export default App;
Print area set with Spire.XLS for JavaScript

Adjust Excel Zoom Scale
The zoom scale controls the magnification level at which a worksheet is displayed on screen. The value ranges from 10 to 400, representing a percentage of normal size. The steps are as follows:
- Create a
Workbookobject usingnew xlsModule.Workbook(). - Get the default worksheet using the
workbook.Worksheets.get(index)method. - Set the zoom scale using the
Zoomproperty. - Save the workbook to an Excel file using the
workbook.SaveToFile()method.
Below is a complete code example demonstrating how to set the zoom scale in React:
function App() {
const setZoomScale = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a workbook and load the existing file
// Load the sample file into VFS
await window.spire.FetchFileToVFS('Sample.xlsx', '', `${process.env.PUBLIC_URL}data/`);
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: 'Sample.xlsx' });
const sheet = workbook.Worksheets.get(0);
// Set the zoom scale to 85%
const pageSetup = sheet.PageSetup;
pageSetup.Zoom = 85;
// Save the workbook
const outputFileName = 'SetZoomScale.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Set Zoom Scale</h1>
<button onClick={setZoomScale}>
Generate
</button>
</div>
);
}
export default App;
Zoom scale set to 85% with Spire.XLS for JavaScript

Fit Excel Table to 1 Page
When printing a large worksheet, the content may span multiple pages, making it difficult to read. The steps are as follows:
- Create a
Workbookobject usingnew xlsModule.Workbook(). - Get the default worksheet using the
workbook.Worksheets.get(index)method. - Populate sample data using the
sheet.Rangeproperty. - Access the
PageSetupobject throughsheet.PageSetup. - Set the fit-to-page properties using the
FitToPagesTallandFitToPagesWideproperties. - Save the workbook to an Excel file using the
workbook.SaveToFile()method.
Below is a complete code example demonstrating how to fit a worksheet to one page in React:
function App() {
const fitToPage = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a workbook and load the existing file
// Load the sample file into VFS
await window.spire.FetchFileToVFS('Sample.xlsx', '', `${process.env.PUBLIC_URL}data/`);
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: 'Sample.xlsx' });
const sheet = workbook.Worksheets.get(0);
// Fit the worksheet content to 1 page
const pageSetup = sheet.PageSetup;
pageSetup.FitToPagesTall = 1;
pageSetup.FitToPagesWide = 1;
// Save the workbook
const outputFileName = 'FitToPage.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Fit Worksheet to 1 Page</h1>
<button onClick={fitToPage}>
Generate
</button>
</div>
);
}
export default App;
Worksheet scaled to fit one page with Spire.XLS for JavaScript

FAQ
How to print gridlines or row/column headings
Cause: By default, gridlines and row/column headings are not printed, which can make the data harder to read on paper.
Solution: Use the IsPrintGridlines and IsPrintHeadings properties of the PageSetup object:
pageSetup.IsPrintGridlines = true;
pageSetup.IsPrintHeadings = true;
How to get the actual page dimensions
Cause: You may need to know the actual width and height of the current paper size to adjust content layout.
Solution: Retrieve the values using the PageWidth and PageHeight properties of the PageSetup object:
var pageWidth = pageSetup.PageWidth;
var pageHeight = pageSetup.PageHeight;
Get a Free License
Spire.XLS for JavaScript offers a 30-day full-featured free trial license with no functional limitations. Apply here to evaluate before purchasing.
Create Excel Charts with JavaScript in React
Adding charts to Excel files is one of the most common data visualization requirements in web applications. Spire.XLS for JavaScript runs entirely in the browser via WebAssembly, using a virtual file system (VFS) to manage input and output files — no backend server required. It supports creating a wide variety of chart types, including column charts, pie charts, doughnut charts, line charts, scatter charts, and more.
This article covers three core features:
For installation and project setup, refer to Integrating Spire.XLS for JavaScript in a React Project. The examples below assume Spire.XLS is installed and the WebAssembly module is initialized.
Create a Column Chart
Column charts are one of the most commonly used chart types for comparing values across categories. With Spire.XLS for JavaScript, you can create a clustered column chart by first populating a worksheet with data, then adding a chart object, setting the chart type to ColumnClustered, and configuring the chart title, axes, and data labels. The steps are as follows:
- Create a
Workbookobject and get the default worksheet. - Populate the worksheet with category labels and numeric data.
- Add a chart to the worksheet using
sheet.Charts.Add(). - Set the chart's
DataRangeto the data range and specify the chart type asExcelChartType.ColumnClustered. - Configure the chart position, title, axis titles, and legend.
- Save the workbook to an Excel file using
SaveToFile().
Below is a complete code example demonstrating how to create a clustered column chart in React:
function App() {
const createColumnChart = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a new workbook and get the default worksheet
const workbook = new xlsModule.Workbook();
const sheet = workbook.Worksheets.get(0);
sheet.Name = "ClusteredColumn";
// Populate chart data
sheet.Range.get("A1").Value = "Country";
sheet.Range.get("A2").Value = "Cuba";
sheet.Range.get("A3").Value = "Mexico";
sheet.Range.get("A4").Value = "France";
sheet.Range.get("A5").Value = "German";
sheet.Range.get("B1").Value = "Jun";
sheet.Range.get("B2").NumberValue = 6000;
sheet.Range.get("B3").NumberValue = 8000;
sheet.Range.get("B4").NumberValue = 9000;
sheet.Range.get("B5").NumberValue = 8500;
sheet.Range.get("C1").Value = "Aug";
sheet.Range.get("C2").NumberValue = 3000;
sheet.Range.get("C3").NumberValue = 2000;
sheet.Range.get("C4").NumberValue = 2300;
sheet.Range.get("C5").NumberValue = 4200;
// Add a chart and set its data range
const chart = sheet.Charts.Add();
chart.DataRange = sheet.Range.get("A1:C5");
chart.SeriesDataFromRange = false;
// Set the chart position
chart.LeftColumn = 1;
chart.TopRow = 6;
chart.RightColumn = 11;
chart.BottomRow = 29;
// Set the chart type to clustered column
chart.ChartType = xlsModule.ExcelChartType.ColumnClustered;
// Configure chart title
chart.ChartTitle = "Sales market by country";
chart.ChartTitleArea.IsBold = true;
chart.ChartTitleArea.Size = 12;
// Configure axis titles
chart.PrimaryCategoryAxis.Title = "Country";
chart.PrimaryCategoryAxis.Font.IsBold = true;
chart.PrimaryCategoryAxis.TitleArea.IsBold = true;
chart.PrimaryValueAxis.Title = "Sales(in Dollars)";
chart.PrimaryValueAxis.HasMajorGridLines = false;
chart.PrimaryValueAxis.MinValue = 1000;
chart.PrimaryValueAxis.TitleArea.IsBold = true;
chart.PrimaryValueAxis.TitleArea.TextRotationAngle = 90;
// Configure data labels: show numeric value on each data point
for (let i = 0; i < chart.Series.Length; i++) {
let cs = chart.Series.get(i);
cs.Format.Options.IsVaryColor = true;
cs.DataPoints.DefaultDataPoint.DataLabels.HasValue = true; // Show value labels
}
// Set legend position
chart.Legend.Position = xlsModule.LegendPositionType.Top;
// Save the workbook
const outputFileName = 'ClusteredColumn.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Create Clustered Column Chart</h1>
<button onClick={createColumnChart}>
Generate
</button>
</div>
);
}
export default App;
Clustered column chart created with Spire.XLS for JavaScript

Create a Pie Chart
Pie charts are ideal for displaying the proportional distribution of data across categories. With Spire.XLS for JavaScript, you can create a pie chart by specifying the chart type as Pie when adding the chart, then binding category labels and data values. The steps are as follows:
- Create a
Workbookobject and get the default worksheet. - Populate the worksheet with category labels and numeric values.
- Add a chart with
ExcelChartType.Pieusingsheet.Charts.Add(). - Set the chart data range and bind category labels and values.
- Configure the chart position, title, and data labels.
- Save the workbook to an Excel file using
SaveToFile().
Below is a complete code example demonstrating how to create a pie chart in React:
function App() {
const createPieChart = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a new workbook and get the default worksheet
const workbook = new xlsModule.Workbook();
let sheet = workbook.Worksheets.get(0);
sheet.Name = "Pie Chart";
// Populate chart data
sheet.Range.get("A1").Value = "Year";
sheet.Range.get("A2").Value = "2002";
sheet.Range.get("A3").Value = "2003";
sheet.Range.get("A4").Value = "2004";
sheet.Range.get("A5").Value = "2005";
sheet.Range.get("B1").Value = "Sales";
sheet.Range.get("B2").NumberValue = 4000;
sheet.Range.get("B3").NumberValue = 6000;
sheet.Range.get("B4").NumberValue = 7000;
sheet.Range.get("B5").NumberValue = 8500;
// Add a pie chart
let chart = sheet.Charts.Add({ chartType: xlsModule.ExcelChartType.Pie });
chart.DataRange = sheet.Range.get("B2:B5");
chart.SeriesDataFromRange = false;
// Set the chart position
chart.LeftColumn = 1;
chart.TopRow = 6;
chart.RightColumn = 9;
chart.BottomRow = 25;
// Configure chart title
chart.ChartTitle = "Sales by year";
chart.ChartTitleArea.IsBold = true;
chart.ChartTitleArea.Size = 12;
// Bind category labels and values
let cs = chart.Series.get(0);
cs.CategoryLabels = sheet.Range.get("A2:A5");
cs.Values = sheet.Range.get("B2:B5");
cs.DataPoints.DefaultDataPoint.DataLabels.HasValue = true; // Show value labels
chart.PlotArea.Fill.Visible = false;
// Save the workbook
const outputFileName = 'Pie.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Create Pie Chart</h1>
<button onClick={createPieChart}>
Generate
</button>
</div>
);
}
export default App;
Pie chart created with Spire.XLS for JavaScript

Create a Doughnut Chart
A doughnut chart is similar to a pie chart but with a hollow center, which can display multiple data series. With Spire.XLS for JavaScript, you can create a doughnut chart by setting the chart type to Doughnut and configuring percentage data labels. The steps are as follows:
- Create a
Workbookobject and get the default worksheet. - Populate the worksheet with category labels and numeric values.
- Add a chart and set its
ChartTypetoExcelChartType.Doughnut. - Configure the chart position, title, and percentage data labels.
- Save the workbook to an Excel file using
SaveToFile().
Below is a complete code example demonstrating how to create a doughnut chart in React:
function App() {
const createDoughnutChart = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Create a new workbook and get the default worksheet
const workbook = new xlsModule.Workbook();
let sheet = workbook.Worksheets.get(0);
// Populate chart data
sheet.Range.get("A1").Value = "Country";
sheet.Range.get("A1").Style.Font.IsBold = true;
sheet.Range.get("A2").Value = "Cuba";
sheet.Range.get("A3").Value = "Mexico";
sheet.Range.get("A4").Value = "France";
sheet.Range.get("A5").Value = "German";
sheet.Range.get("B1").Value = "Sales";
sheet.Range.get("B1").Style.Font.IsBold = true;
sheet.Range.get("B2").NumberValue = 6000;
sheet.Range.get("B3").NumberValue = 8000;
sheet.Range.get("B4").NumberValue = 9000;
sheet.Range.get("B5").NumberValue = 8500;
// Add a doughnut chart
let chart = sheet.Charts.Add();
chart.ChartType = xlsModule.ExcelChartType.Doughnut;
chart.DataRange = sheet.Range.get("A1:B5");
chart.SeriesDataFromRange = false;
// Set the chart position
chart.LeftColumn = 4;
chart.TopRow = 2;
chart.RightColumn = 12;
chart.BottomRow = 22;
// Configure chart title
chart.ChartTitle = "Market share by country";
chart.ChartTitleArea.IsBold = true;
chart.ChartTitleArea.Size = 12;
// Show percentage data labels
for (let i = 0; i < chart.Series.Count; i++) {
chart.Series.get(i).DataPoints.DefaultDataPoint.DataLabels.HasPercentage = true;
}
// Set legend position
chart.Legend.Position = xlsModule.LegendPositionType.Top;
// Save the workbook
const outputFileName = 'CreateDoughnutChart.xlsx';
workbook.SaveToFile(outputFileName);
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Create Doughnut Chart</h1>
<button onClick={createDoughnutChart}>
Generate
</button>
</div>
);
}
export default App;
Doughnut chart created with Spire.XLS for JavaScript

Chart Type Reference
The examples above covered column charts, pie charts, and doughnut charts. In addition, Spire.XLS supports all standard Excel chart types, which are defined in the Spire.Xls.ExcelChartType enumeration. The complete list of 81 chart types is as follows:
| Chart Type | Description |
|---|---|
| 1. ColumnClustered | Represents Clustered Column Chart |
| 2. ColumnStacked | Represents Stacked Column Chart |
| 3. Column100PercentStacked | Represents 100% Stacked Column Chart |
| 4. Column3DClustered | Represents 3D Clustered Column Chart |
| 5. Column3DStacked | Represents 3D Stacked Column Chart |
| 6. Column3D100PercentStacked | Represents 3D 100% Stacked Column Chart |
| 7. Column3D | Represents 3D Column Chart |
| 8. BarClustered | Represents Clustered Bar Chart |
| 9. BarStacked | Represents Stacked Bar Chart |
| 10. Bar100PercentStacked | Represents 100% Stacked Bar Chart |
| 11. Bar3DClustered | Represents 3D Clustered Bar Chart |
| 12. Bar3DStacked | Represents 3D Stacked Bar Chart |
| 13. Bar3D100PercentStacked | Represents 100% 3D Stacked Bar Chart |
| 14. Line | Represents Line Chart |
| 15. LineStacked | Represents Stacked Line Chart |
| 16. Line100PercentStacked | Represents 100% Stacked Line Chart |
| 17. LineMarkers | Represents Markers Line Chart |
| 18. LineMarkersStacked | Represents Stacked Markers Line Chart |
| 19. LineMarkers100PercentStacked | Represents 100% Stacked Markers Line Chart |
| 20. Line3D | Represents 3D Line Chart |
| 21. Pie | Represents Pie Chart |
| 22. Pie3D = 21 | Represents 3D Pie Chart |
| 23. PieOfPie | Represents Pie of Pie chart |
| 24. PieExploded | Represents Exploded Pie Chart |
| 25. Pie3DExploded | Represents 3D Exploded Pie Chart |
| 26. PieBar | Represents Bar Pie Chart |
| 27. ScatterMarkers | Represents Markers Scatter Chart |
| 28. ScatterSmoothedLineMarkers | Represents ScatterSmoothedLineMarkers Chart |
| 29. ScatterSmoothedLine | Represents ScatterSmoothedLine Chart |
| 30. ScatterLineMarkers | Represents ScatterLineMarkers Chart |
| 31. ScatterLine | Represents ScatterLine Chart |
| 32. Area | Represents Area Chart |
| 33. AreaStacked | Represents AreaStacked Chart |
| 34. Area100PercentStacked | Represents Area100PercentStacked Chart |
| 35. Area3D | Represents Area3D Chart |
| 36. Area3DStacked | Represents Area3DStacked Chart |
| 37. Area3D100PercentStacked | Represents Area3D100PercentStacked Chart |
| 38. Doughnut | Represents Doughnut Chart |
| 39. DoughnutExploded | Represents DoughnutExploded Chart |
| 40. Radar | Represents Radar Chart |
| 41. RadarMarkers | Represents RadarMarkers Chart |
| 42. RadarFilled | Represents RadarFilled Chart |
| 43. Surface3D | Represents Surface3D Chart |
| 44. Surface3DNoColor | Represents Surface3DNoColor Chart |
| 45. SurfaceContour | Represents SurfaceContour Chart |
| 46. SurfaceContourNoColor | Represents SurfaceContourNoColor Chart |
| 47. Bubble | Represents Bubble Chart |
| 48. Bubble3D | Represents Bubble3D Chart |
| 49. StockHighLowClose | Represents StockHighLowClose Chart |
| 50. StockOpenHighLowClose | Represents StockOpenHighLowClose Chart |
| 51. StockVolumeHighLowClose | Represents StockVolumeHighLowClose Chart |
| 52. StockVolumeOpenHighLowClose | Represents StockVolumeOpenHighLowClose Chart |
| 53. CylinderClustered | Represents CylinderClustered Chart |
| 54. CylinderStacked | Represents CylinderStacked Chart |
| 55. Cylinder100PercentStacked | Represents Cylinder100PercentStacked Chart |
| 56. CylinderBarClustered | Represents CylinderBarClustered Chart |
| 57. CylinderBarStacked | Represents CylinderBarStacked Chart |
| 58. CylinderBar100PercentStacked | Represents CylinderBar100PercentStacked Chart |
| 59. Cylinder3DClustered | Represents Cylinder3DClustered Chart |
| 60. ConeClustered | Represents ConeClustered Chart |
| 61. ConeStacked | Represents ConeStacked Chart |
| 62. Cone100PercentStacked | Represents Cone100PercentStacked Chart |
| 63. ConeBarClustered | Represents ConeBarClustered Chart |
| 64. ConeBarStacked | Represents ConeBarStacked Chart |
| 65. ConeBar100PercentStacked | Represents ConeBar100PercentStacked Chart |
| 66. Cone3DClustered | Represents Cone3DClustered Chart |
| 67. PyramidClustered | Represents PyramidClustered Chart |
| 68. PyramidStacked | Represents PyramidStacked Chart |
| 69. Pyramid100PercentStacked | Represents Pyramid100PercentStacked Chart |
| 70. PyramidBarClustered | Represents PyramidBarClustered Chart |
| 71. PyramidBarStacked | Represents PyramidBarStacked Chart |
| 72. PyramidBar100PercentStacked | Represents PyramidBar100PercentStacked Chart |
| 73. Pyramid3DClustered | Represents Pyramid3DClustered Chart |
| 74. CombinationChart | Represents Combination Chart |
| 75. Funnel | Represents Funnel Chart |
| 76. WaterFall | Represents Waterfall Chart |
| 77. BoxAndWhisker | Represents Box and Whisker Chart |
| 78. Histogram | Represents Histogram Chart |
| 79. Pareto | Represents Pareto Chart |
| 80. TreeMap | Represents Tree Map Chart |
| 81. SunBurst | Represents Sunburst Chart |
FAQ
How to show values or percentages on pie/doughnut chart labels
Solution: Choose the appropriate label property based on your needs:
// Show value labels
cs.DataPoints.DefaultDataPoint.DataLabels.HasValue = true; // Show value labels
// Or show percentage labels
cs.DataPoints.DefaultDataPoint.DataLabels.HasPercentage = true;
Legend in the generated Excel file is truncated or not fully displayed
Cause: The chart area is too small to accommodate all legend items, or the legend position setting causes overlap with the chart data area.
Solution: Increase the vertical range of the chart or adjust the legend position:
// Increase chart height
chart.BottomRow = 35;
// Or adjust legend position
chart.Legend.Position = xlsModule.LegendPositionType.Bottom;
Get a Free License
Spire.XLS for JavaScript offers a 30-day full-featured free trial license with no functional limitations. Apply here to evaluate before purchasing.